This article was previously published under Q315159
You may receive an error message if all the following conditions are true:
An ASP.NET worker process (Aspnet_wp.exe) runs under the default ASPNET account.
You do not enable impersonation on that application.
You use the SQL Server .NET Data Provider or the OLE DB .NET Data Provider to connect to a database.
You may receive any of the following error messages: Message 1
OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
SqlException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
System.Data.SqlClient.SqlException: SQL Server does not exist or access denied
System.Data.OleDbClient.OleDbException: SQL Server does not exist or access denied
When the ASP.NET worker process runs under the ASPNET account, if you do not enable impersonation for an application, all the threads that run the requests for that application run under the process account. The ASPNET account cannot establish a named pipes connection to the database server.
To work around this problem, use one of the following methods:
Turn on impersonation on your ASP.NET application. This method works if the impersonated user has access to the computer and to the database server that you access.
Use Transmission Control Protocol/Internet Protocol (TCP/IP) instead of the named pipes protocol to connect to the database. To do this, add the following attribute to the connection string: