Click here to Skip to main content
15,867,780 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When I hosted website on server and try to login from the browser i get this error 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)
My connction string is Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\bdcdb.mdf;Integrated Security=True;User Instance=True
Posted

1 solution

You must have to add SERVER NAME in connection string. If you are not familiar with your SERVER name then please ask to your hosting company for the same.

Have a happy coding.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900