PRB: Accessing SQL Database Fails on Second Attempt
This article was previously published under Q166659 On This PageSYMPTOMS
One of the following error occurs when trying to access a SQL database via
Active Server Pages (ASP) under Internet Informaton Server (IIS) 3.0:
Error '80004005'
Microsoft OLE DB Provider for ODBC Drivers error '80040e21', Errors
Occurred
-or-
80004005: ConnectionWrite(GetOverLappedResult)
The error occurs on the second access to the data. For example, using a
form generated by the DataForm Wizard clicking on the ">>" button to view the next 10 records results in the error described above.
This issue occurs when all of the following conditions are met:
CAUSE
When the allow Anonymous User context is turned off, Windows NT is closing the pipe
to SQL Server after the first request is complete. This is because the
first connection to SQL Server is made under the IIS Anonymous User
account. IIS then either impersonates the browser client on that same
thread, or tries to access the connection on a different thread that is
running in the impersonated user context. In either case Windows NT would detect
the attempt to use a network named pipe handle that had been opened in a
different user context and force the pipe closed, per its security rules.
When the connections are viewed on the SQL Server with a network monitor, a name pipe close request comes from Windows NT, causing the error in the Web browser. RESOLUTION
There are two relatively easy workarounds:
MORE INFORMATIONSteps to Reproduce Behavior
REFERENCES
For the latest Knowledge Base articles and other support information on
Visual InterDev and Active Server Pages, see the following page on the
Microsoft Technical Support site:
http://support.microsoft.com/search/default.aspx?qu=vinterdev (http://support.microsoft.com/search/default.aspx?qu=vinterdev) APPLIES TO
| Article Translations
|
Back to the top
