This problem can occur if all of the following conditions are true:
- You are trying to establish the connection to SQL Server using the Named Pipes network library.
- The SQL Server is on a separate computer from the Internet Information Server (IIS) server.
- You are trying to establish the connection to the database from within the Session_OnEnd() event of ASP.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
- Switch the network library that the client code is using to connect to SQL Server to Transmission Control Protocol/Internet Protocol (TCP/IP). If you use TCP/IP to connect to SQL Server, then the authentication noted earlier does not have to take place. You can do this by configuring the "client configuration" option of the data source name (DSN) that you are using to connect to SQL Server (if you are using a DSN) or by adding a parameter to the connection string telling it to connect using the TCP/IP library. The following Knowledge Base article describes how to add this parameter to the connection string:238949 Set the SQL Server Network Library in an ADO ConnectionIn addition, you must make sure that SQL Server is configured to listen on the TCP/IP protocol. You can do this by using the Server Network Utility with SQL Server 7.0 or through Setup for SQL Server 6.5. For more information on this, please see the SQL Server Books Online.
- If your Web application is running out of process, then the Session_OnEnd() event will fire in the security context of the local IWAM_[IIS computer name]. In this scenario, you can also work around the problem by adding a local user account on the SQL Server computer that corresponds to the IWAM_[IIS computer name] account. This local user account on the SQL Server computer must have an identical user name and password.
ID d'article : 247968 - Dernière mise à jour : 16 juil. 2001 - Révision : 1