Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 315159 - Last Review: May 13, 2007 - Revision: 2.6
BUG: Named pipes do not work when worker process runs under ASPNET account
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.]
Message 2 SqlException (0x80004005):
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
denied.]
Message 3 System.Data.SqlClient.SqlException: SQL
Server does not exist or access denied
Message 4 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:
"Network Library =dbmssocn"
For example:
"User ID=myUserId;Password=myPassword;Initial Catalog=Pubs;Data Source=myServer;Network Library =dbmssocn"
- Check the database for the protocols that are enabled. For a SQL Server database, run the Server Network Utility to check for specific protocols.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
For additional information about ASP.NET security, click the following article number to view the article in the Microsoft Knowledge Base:
306590Â
(http://kbalertz.com/Feedback.aspx?kbNumber=306590/
)
ASP.NET security overview
For more information about the <processModel>
section, refer to the following MSDN documentation:
APPLIES TO
- Microsoft ASP.NET (included with the .NET Framework)
- Microsoft ASP.NET 1.1
- Microsoft ADO.NET 1.1
- Microsoft ADO.NET 2.0
| kbbug kbdatabase kbhttpruntime kbnofix kbreadme kbsecurity KB315159 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please