Microsoft Knowledge Base Email Alertz

KBAlertz.com: (315159) - Under the following circumstances An ASP.NET worker process (Aspnet_wp.exe) runs under the default ASPNET account. -and- You do not enable impersonation on that application. -and- You use the SQL Server .NET Data Provider or the OLE DB .NET Data...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








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

SYMPTOMS

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

CAUSE

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.

RESOLUTION

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.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

REFERENCES

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:
http://msdn2.microsoft.com/en-us/library/7w2sway1(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/7w2sway1(vs.71).aspx)

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
Keywords: 
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