关于在连接数据库时候命名管道不工作的官方解决办法
来源:互联网 发布:linux 类似telnet命令 编辑:程序博客网 时间:2024/06/05 03:10
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
BUG: Named Pipes Do Not Work When Worker Process Runs Under ASPNET Account
The information in this article applies to:
Microsoft ASP.NET (included with the .NET Framework)
Microsoft ADO.NET (included with the .NET Framework)
This article was previously published under Q315159
SYMPTOMS
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 Provider to connect to a database.
you may receive any of the following error messages:
OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
-or-
SqlException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
-or-
System.Data.SqlClient.SqlException: SQL Server does not exist or access denied
-or-
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:
Configure the ASP.NET worker process to run under the SYSTEM account in the <processModel> section of the Machine.config file.
Enable impersonation on your ASP.NET application. This method works if the impersonated user has access to the computer and the database server that you are accessing.
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"
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
REFERENCES
For additional information about ASP.NET security, click the article number below to view the article in the Microsoft Knowledge Base:
306590 INFO: ASP.NET Security Overview
For more information about the <processModel> section, refer to the following MSDN documentation:
<processModel> Section
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfprocessmodelsection.asp
Last Reviewed: 6/14/2002
Keywords: kbbug kbDatabase kbDSupport kbHttpRuntime kbreadme kbSecurity KB315159
关于在连接数据库时候命名管道不工作的官方解决办法';return true">
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
MS已经确认这是一个BUG了BUG: Named Pipes Do Not Work When Worker Process Runs Under ASPNET Account
The information in this article applies to:
Microsoft ASP.NET (included with the .NET Framework)
Microsoft ADO.NET (included with the .NET Framework)
This article was previously published under Q315159
SYMPTOMS
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 Provider to connect to a database.
you may receive any of the following error messages:
OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
-or-
SqlException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
-or-
System.Data.SqlClient.SqlException: SQL Server does not exist or access denied
-or-
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:
Configure the ASP.NET worker process to run under the SYSTEM account in the <processModel> section of the Machine.config file.
Enable impersonation on your ASP.NET application. This method works if the impersonated user has access to the computer and the database server that you are accessing.
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"
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
REFERENCES
For additional information about ASP.NET security, click the article number below to view the article in the Microsoft Knowledge Base:
306590 INFO: ASP.NET Security Overview
For more information about the <processModel> section, refer to the following MSDN documentation:
<processModel> Section
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfprocessmodelsection.asp
Last Reviewed: 6/14/2002
Keywords: kbbug kbDatabase kbDSupport kbHttpRuntime kbreadme kbSecurity KB315159
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 关于在连接数据库时候命名管道不工作的官方解决办法
- 远程连接时候,提示“您的凭据不工作”
- “PL/SQL在连接数据库后,一段时间不操作的话,会断开连接”的解决办法
- “PL/SQL在连接数据库后,一段时间不操作的话,会断开连接”的解决办法 .
- 关于mysql数据库8小时不进行操作连接自动断开问题的解决办法
- QT程序在其他机器连接不上数据库解决办法
- 用window2000server的时候发现hibernate连接不上数据库?
- 关于在Xshell中连接不上CentOS 7的解决办法
- 关于命名管道FIFO不错的总结
- ado.net连接不上sql2008:provider: 命名管道提供程序, error: 40 - 无法打开到SQL Server的连接
- 关于java数据库章节connection连接不成功的时候!!!
- Navicat连接SQL Server数据库,报错08001-命名管道提供程序:无法打开与SQL Server的连接[2].
- 关于mysql数据库不出现名为mysql数据库的解决办法
- CodeSmith连接不上PostgreSql,MySql数据库的解决办法
- Win10连接远程桌面的时候提示您的凭证不工作
- win7 连接server2008远程桌面连接报错:“您的凭据不工作”的解决办法
- win7 连接server2008远程桌面连接报错:“您的凭据不工作”的解决办法
- 命名管道,read函数不阻塞的解决方法
- 社区(php&&mysql)四
- C#学习笔记之五(ADO.net)
- 社区(php&&mysql)三
- 里面是对一个body的属性进行server的一些设定,不过可以衍生到其他的一些htmlcontrol
- 社区(php&&mysql)一
- 关于在连接数据库时候命名管道不工作的官方解决办法
- 连接SQL SERVER公共类
- 社区(php&&mysql)二
- C# v.s java 再贴+评点
- 人大复印资料处理程序_补充篇
- 转新技术网:在ASP.NET中使用.NET组件
- 解决一个.NET联接SQL的问题 yiyang(转贴)
- VS2003开发指南文档----中文
- 自己写的一个资料验证的asp.net程序,大家看看吧!