Link to home
Start Free TrialLog in
Avatar of Cyberzones
Cyberzones

asked on

SQLEXPRESS Connection String Question

I am having a problem with my connection strings to my SQLEXPRESS database.

This connection sting works great on the development machine:

<add name="SuppliersConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DBname.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

I upload the files (ASP.NET 2.0 web.config) to my web hosting company and I get this error when I try to open a page that references this string:

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

My hosting company just wants me to take the SQLEXPRESS databases and upgrade them and put them on the SQL Server 2005 database that comes with the hosting plan. I would rather keep them separate.

The hosting plan comes with this (example) info:

IP address: 123.123.123.123
SQL Server 2005 database server name: SQL2005.webhostingco.com

Of course, I have a user name and password.

How can I fix this? What is the correct connection string, if there is one?

Thanks for the help!!
ASKER CERTIFIED SOLUTION
Avatar of sara110
sara110

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi,
sara110's post would solve your problem.
Avatar of rboyd56
rboyd56

Since you are using SQLExpress, make sure that the hosting company has enabled has enabled TCP/IP for the instance of SQLExpress. By default it is not enabled so it will need to be enabled before remote users can connect.