views:

35

answers:

3

I have upload my website to a shared hosting, set-up everything and my asp.net 3.5 app won't connect to SQL Server database on the shared hosting provider.

This is the error I get:

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

I'm using a built-in login control to connect to the database. Everything works fine on a local computer but it won't work online.

A: 

Can you post the connection string that you are using to access your SQL database? (Minus sensitive data of course.)

jlech
A: 

connectionString="server=.\SQLEXPRESS;uid=USERNAME;pwd=PASSWORD;database=ASPNETDB.MDF"

EDIT: I've tried putting www.mydomain.com IP address instead of SQLEXPRESS but then I get 500 internal error and can't access anything

joseph
A: 

Your host might not have SQL express installed.

andrewWinn