Server Error in '/' Application. 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) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: 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) Source Error: [No relevant source lines] Source File: App_Code.8ojkszie.1.cs Line: 21 Stack Trace: [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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
<configuration> <connectionstrings> <add name="myConnectionString" connectionstring="Data Source=mydatasource.db.11311029.myresource.com; Initial Catalog=test; User ID=test; Password='test'; "> providerName="System.Data.SqlClient" /> </add></connectionstrings> <system.web> <compilation debug="true" targetframework="4.0" /> <anonymousidentification enabled="true" /> <profile enabled="true"> <properties> <add name="SCart" serializeas="Binary" type="ShoppingCartExample.Cart" allowanonymous="true" /> </properties> </profile> <authorization> <allow users="?" /> <allow roles="admin" /> </authorization> <rolemanager enabled="true" /> <authentication mode="Forms" /> <customerrors mode="Off" /> </system.web> </configuration>
Data Source=mydatasource.db.11311029.myresource.com
Quote:DBMSSOCN=TCP/IP is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server. Read more here[^]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)