Unable to connect to sql server 2008 express System.Data.SqlClient.SqlException (0x80131904):

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.
12/17/2010 1:04:45 PM
Gravatar
Total Posts 9

Unable to connect to sql server 2008 express System.Data.SqlClient.SqlException (0x80131904):

I am getting following error message while installation

 

Probing system...
File system permissions ok.
The system cannot connect to the MSSQL database. Please check your connection string.

System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to 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)

here is my connection string

<add key="MSSQLConnectionString" value="server=PANKAJ-PC\SQLEXPRESS;UID=testuser;PWD=test123;database=mojo_portal;"/>

I am able to connect to database using Sql server management studio....

Please help for this issue.

Thanks

12/17/2010 1:17:43 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Unable to connect to sql server 2008 express System.Data.SqlClient.SqlException (0x80131904):

You may need to enable Remote Connection on SQL Server 2008 Express.

Do a quick search on it and you'll find 100 sites with tutorials on how to do that.

Rick (Arvixe)

12/18/2010 7:36:15 AM
Gravatar
Total Posts 18439

Re: Unable to connect to sql server 2008 express System.Data.SqlClient.SqlException (0x80131904):

you should make sure the SQL Server is configured for mixed mode authentication with both windows and sql users. Probably from sql management studio you are using windows credentials, try connecting sql management using the same sql user credentials as you have in the connection string and see what happens.

Hope it helps,

Joe

7/17/2012 4:44:18 PM
Gravatar
Total Posts 5

Re: Unable to connect to sql server 2008 express System.Data.SqlClient.SqlException (0x80131904):

I had same problem with a new installation of SQL Server 2012 Express.

I fixed it as follow:

  • SQLEXPRESS 2012 comes having TCP/IP protocol disabled, so I enabled it by SQL Server Configuration manager
  • I add a couple of exceptions to the firewall:
    - INBOUND RULE: enabling port 1433 of the relevant profiles (mine were Private and Domine)
    - OUTBOUND RULE: enabling sqlservr.exe of relevant profiles

Hope this can be useful...

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