Connection String for local host SQL Server 2012 Express?

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
9/15/2013 7:07:12 AM
Gravatar
Total Posts 77

Connection String for local host SQL Server 2012 Express?

 I can't figure out the connection string for MS SQL Server Express.

- I downloaded and installed the source code in VS 2010. Very smooth!

For development, I use local host with windows authentication to access my local MS SQL Server 2012 Express installation.
But I don't use passwords because of the extra hassle.

- The Web.web.config file has the sample string:
 <add key="MSSQLConnectionString" value="server=yourservername;UID=yourdatabaseusername;PWD=yourdatabaseuserpassword;database=yourdatabasename" />

- I set up a "Mojo" database using SQL Server Management Studio.
- VS Server Explorer gives me this connection string:  Data Source=D5500;Initial Catalog=Mojo;Integrated Security=True

Given that I want to use integrated security and not a password based connection string,
What do I put into the web.web.config file ?

9/15/2013 9:08:51 AM
Gravatar
Total Posts 18439

Re: Connection String for local host SQL Server 2012 Express?

you should configure your sql server for mixed mode so it supports both windows and sql authentication, then you should create a sql user that is dbo of the database and use that user and password just as if you were in a hosting environment.

9/15/2013 9:40:53 AM
Gravatar
Total Posts 77

Re: Connection String for local host SQL Server 2012 Express?

Thanks for your quick reply.

I did what you said but build gives 24 errors:

Any clues?

 

Error    1    Unknown server tag 'portal:jDatePicker'.    D:\Docs\MojoPortal\MiscUtilities\IndexRecentContent.aspx    265    
Error    2    Unknown server tag 'portal:jDatePicker'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    347    
Error    3    Unknown server tag 'portal:jDatePicker'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    348    
Error    4    Unknown server tag 'portal:mojoButton'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    353    
Error    5    Unknown server tag 'portal:mojoLabel'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    357    
Error    6    Unknown server tag 'portal:mojoCutePager'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    362    
Error    7    Unknown server tag 'portal:mojoButton'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    384    
Error    8    Unknown server tag 'portal:mojoCutePager'.    D:\Docs\MojoPortal\MiscUtilities\IndexBrowser.aspx    397    
Error    9    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    2    
Error    10    The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    12    
Error    11    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    8    
Error    12    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    6    
Error    13    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    4    
Error    14    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    3    
Error    15    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    5    
Error    16    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    9    
Error    17    The type or namespace name 'mojoPortal' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    7    
Error    18    The type or namespace name 'ILog' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    35    
Error    19    The type or namespace name 'SubscriberRepository' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    36    
Error    20    The type or namespace name 'SiteSettings' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    37    
Error    21    The type or namespace name 'LetterInfo' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    39    
Error    22    The type or namespace name 'LetterInfo' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    229    
Error    23    The type or namespace name 'LetterSubscriber' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    256    
Error    24    The type or namespace name 'LetterSubscriber' could not be found (are you missing a using directive or an assembly reference?)    D:\Docs\MojoPortal\MiscUtilities\NewsLetterImportUtil.aspx    305    
Warning    25    The 'inheritInChildApplications' attribute is not allowed.    D:\Docs\MojoPortal\Web\Web.config    704    13    D:\Docs\MojoPortal\
Warning    26    The element 'system.web' has invalid child element 'sanitizer'. List of possible elements expected: 'anonymousIdentification, authentication, authorization, browserCaps, clientTarget, compilation, customErrors, deployment, deviceFilters, fullTrustAssemblies, globalization, healthMonitoring, hostingEnvironment, httpCookies, httpHandlers, httpModules, httpRuntime, identity, machineKey, membership, mobileControls, pages, partialTrustVisibleAssemblies, processModel, profile, roleManager, securityPolicy, sessionPageState, sessionState, siteMap, trace, trust, urlMappings, webControls, webParts, webServices, xhtmlConformance, caching'.    D:\Docs\MojoPortal\Web\Web.config    907    8    D:\Docs\MojoPortal\
Warning    27    The 'inheritInChildApplications' attribute is not allowed.    D:\Docs\MojoPortal\Web\Web.config    1004    13    D:\Docs\MojoPortal\
 

9/15/2013 10:06:58 AM
Gravatar
Total Posts 18439

Re: Connection String for local host SQL Server 2012 Express?

What you just posted has nothing to do with the database. Please ask one question per thread in these forums to help keep topics organized.

 I have no idea what you have done or are doing.

"D:\Docs\MojoPortal\MiscUtilities\IndexRecentContent.aspx"

​The files it is complaining about are not even part of a web project or solution, those files exist in the source code repository but not as part of a project and you should not try to run that folder in IIS or even in VS. You should open mojoportal.sln rebuild the entire solution and point IIS to the Web folder which contains the main mojoPortal web project, all other projects run in the context of that one.

9/16/2013 8:36:34 AM
Gravatar
Total Posts 77

Re: Connection String for local host SQL Server 2012 Express?

OK Joe.

I'm just an ignorant potential user of MojoPortal.
In my ignorance, I just followed the instructions on your website and that's where I ended up.

Now I have followed your instruction to: "open mojoportal.sln rebuild the entire solution and point IIS to the Web folder which contains the main mojoPortal web project, all other projects run in the context of that one."

It took me a while to figure out:
(1) that I didn't have IIS installed
(2) install IIS
(3) figure out how to use it
(4) fix the error messages I got whilst trying to point IIS to the web folder {the warning about re-using port 80}.

But I got there in the end! 

Now I'm stuck again on with the machine key error:

Line 709: visit Administration > Security Advisor and you will see the tool to generate a machine key. Line 710: --> Line 711: <machineKey validationKey="55BA53B475CCAE0992D6BF9FE463A5E97F00C6C16DA3D7DF9202E560078AB501643C15514785FEE30FEF26FC27F5CE594B42FFCA55452EF90E8A056B4DAE9F39" decryptionKey="939232D527AC4CD3E449441FE887DA110A16C1A36924C424CBAAE3F00282436C" validation="SHA1" decryption="AES" /> Line 712: <xhtmlConformance mode="Strict" /> Line 713: <!-- Example culture settings

Line 705 of the web.config says:

<!-- It is extremely important that you replace this machine key with one you generate. If you
           use encrypted passwords, don't change the machine key after that or you will not be able
           to decrypt passwords. There is a tool built into mojoPortal for generating a machine key
           visit Administration > Security Advisor and you will see the tool to generate a machine key.

        -->
 

But how can I generate a new machine key when I can't even start the application?

And, for future reference, my plan is to test & modify your code on my local machine and then, when it is working, upload it to a hosting service. Will it be necessary to update the machine key when I move the code to a hosting service?

Thanks

Your ignorant, (but still potential) user

 

9/16/2013 9:30:11 AM
Gravatar
Total Posts 18439

Re: Connection String for local host SQL Server 2012 Express?

It sounds like you are having an error with web.config file, it is not likely related to machine key at all and the line number in the error message is likely not correct. Any typo in Web.config or user.config will cause an error, so I have no idea what the error is, you should review carefully any modifications you made to either of those files.

However for your future plans I recommend do NOT modify any mojoportal code. If you do that you will never be able to upgrade to new versions and we cannot offer any support for forked versions of the code.

You must sign in to post in the forums. This thread is closed to new posts.