I'm working on a website using ASP.NET, C# and mssql. When I run the website on our local server it is working fine.
The following error occurs when I run it on a shared server:
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 don't know how to play with connection string now since I'm very new to this.
It is recommend to keep the connection string in web.config. To create a valid connection string with SQL Server (either located on network or locally), use following steps:
Steps:
UPDATE
check following link for creating UDL http://msdn.microsoft.com/en-us/library/e38h511e(v=vs.71).aspx
check following link for connection string Setting up connection string in ASP.NET to SQL SERVER
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.