The system cannot connect to the MSSQL database....

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.
5/31/2008 12:42:34 PM
Gravatar
Total Posts 18

The system cannot connect to the MSSQL database....

 I'm trying to get mojoportal to run on my local machine to evaluate it for I hosted site.  I am running VS.net 2005 Express and MSSQL 2005 Express.  I have create the db and caon connecto to it via windows auth and sql login.  I have used the default db name UID and OW.  I can connec to the db in the VS.net db explorer using either connection method. 

When I load the test web in VS.net and open and try to view the default.apsx from VS.net I get the following error text below.  I have also noticed that VS.net give and error that 'Default.apsx.cs' was not found and a warning "Attribute 'Condebehind' in the @ Page directive is no longer supported..." 

Forgive my ignorance.  If some could help I would appreciate it.

----------------- text from the web page ----------------------

Welcome to mojoPortal Setup
Probing system...
File system permissions ok.

The system cannot connect to the MSSQL database. Please check your connection string.


System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at mojoPortal.Data.DBPortal.DatabaseHelperGetConnectionError(String overrideConnectionInfo)

Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.
 

---------------------- end of text --------------------

 

 

5/31/2008 12:56:58 PM
Gravatar
Total Posts 18439

Re: The system cannot connect to the MSSQL database....

Hi,

For the VS error, the problem is that VS 2005 Express does not support the web application project type and also does not support class library projects as far I know. I have read that the very newest release of VS 2008 Express does support these project types, but have not tried it myself so can't say for sure whether it can work with mojoPortal.

For the database error you most likely need to configure SQLExpress for mixed mode authentication which allows both windows and sql logins. I think for mojoportal you will need to use a sql login. After configuring mixed mode, create a sql user and then make the user dbowner of the db you created. Then set the connection string in Web.config with the sql user name password and db name. If your SQLExpress is installed as a default instance you can use (local) for the server name. If its installed as a named instance the server name would be (local)/instancename, where instance name "might" be "SQLExpress" depending on whether you used the default settings during installation of SQLExpress.

Hope it helps,

Joe

5/31/2008 4:05:00 PM
Gravatar
Total Posts 18

Re: The system cannot connect to the MSSQL database....

Joe,

I tried VS.Net 2008 Express.  When I run the Default.aspx I get a Page_Fault_in_Nonpaged_area" BSOD.  I don't get it with a simpler aspx project.  I've serched the web and their seems to a rash of BSOD posts, but no real solutions for me. 

If I can't evaluate this in VS.net Express what do you recommend?

John

5/31/2008 4:40:58 PM
Gravatar
Total Posts 18439

Re: The system cannot connect to the MSSQL database....

Hi John,

I read about the new support for Web Application project and class libraries in the SP 1 beta announcement, so I'm guessing you need the VS 2008 Express with SP1 beta from here. You may have to completely uninstall the version you have now.

Hope it helps,

Joe

5/31/2008 8:12:31 PM
Gravatar
Total Posts 18

Re: The system cannot connect to the MSSQL database....

Joe,

Thanks a lot!  Looks like the SP1 fixed the BSOD.  Now I have to get my connection string working.  Being the novice that I am  - I'm not usre that I've configured SQLExpress for mixed mode authentication.  Is that doen during SQL Express installation or is it done during DB creation?  I can log into the db via windows authentication or through the user (mojouser) and its dbownership that I set up for mojoportal.mdf.  Does that indicate that I've got it setup for mixed mode?

My SQLExpress is installed as a default instance - I've used it in the connection string for other dbs.

Any advice on MS SQL Exoress for Dummys info? 

John

5/31/2008 10:58:44 PM
Gravatar
Total Posts 18

Re: The system cannot connect to the MSSQL database....

Joe,

Looks like I spoke too soon about the BSOD.  It still occurs, but not at the same point.  I opened Default.aspx and it came up with the SQL connection message as posted above.  I walked away from my machine and came back and there was the BSOD. 

Is the express version of VS.net the issue?  Are developing under the full version?

Would you suggest I upgrade from my XP HE to XP Pro, Install IIS and run mojoportal from there as opposed to tryng to run it though VS.net 2008 Express to evaluate it more extensively than just playing with the online demo?

John

 

6/1/2008 6:49:48 AM
Gravatar
Total Posts 18439

Re: The system cannot connect to the MSSQL database....

Hi John,

Thats dissapointing about the BSOD, I was really hoping the new free version of VS would work. I use VS 2008 Pro, you can download and install it and it works for either 90 or 180 days (I forget which) without a registration code. I just hope the first BSOD didn't hose anything up on your machine thats causing the current BSOD.

As for SQLExpress, you can cofigure mixed mode during installation but you can also do it after installation.

1. Open SQL Server Management Studio Express

2. Right click the top node and choose properties

3. In the dialog window that opens click Security on the left side and you will see 2 radio buttons, 1 for windows authentication mode and 1 for SQL Server and Windows Authentication mode, thats the one you want. Save and close that window

4. Create a sql login (branch down the Security > Logins node, right click logins and choose new login.

5. Set the login name and password then click the "User Mapping" on the left pane and you can select the db you created and make the user dbo or dbowner for that db.

All the VS.NET stuff you've been doing is only needed if you are trying to evaluate in terms of doing custom development on top of mojoPortal. If that is not that case you can just install the relase files of mojoportal and configure IIS to test it. I also just reset the demo site so its not all junked up at the moment and you can evaluate there too if you like.

Hope it helps,

Joe

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