Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Database connection Error

In my web application, when I redirect to another page, I get the following error.

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)

I tried to place a response.write command in the page load event. However, the error appears before the response.write statement.

The database connection string is as follows:

const string ConnString = "User ID=SQL_CAIRS;Data Source='10.100.1.67';Password=PASSWORD;Initial Catalog=db_inspection;Persist Security Info=True;Workstation ID=90304YF9W41;Packet Size=4096";
[809 byte] By [rkbnair] at [2007-11-11 7:45:18]