Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: ASP Pages Fail on Access to Session and Application Objects


View products that this article applies to.

Symptoms

When you try to load secure Active Server Pages (ASP files) that use Session or Application objects defined in a secure ASP Application file (Global.asa), it may fail. For example, when you try to load a page that uses a DSN string stored in the Session object to open an ADO connection, it may fail with the following error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified /vroot/query.asp, line xx

↑ Back to the top


Cause

This problem occurs because the Global.asa file requires anonymous access to be correctly detected and compiled on the first access by a client.

The first access by a client is always anonymous. When an anonymous request for a secure ASP file occurs, ASP fails the attempt to load the requested file; however, it tries to detect and compile the Global.asa file anyway.

ASP uses GetFileAttributes to detect the Global.asa file in a given mapped Virtual directory. Because an anonymous user does not have sufficient privilege to access a secure Global.asa file, the call to GetFileAttributes fails with an Access Denied error message. Because the call to GetFileAttributes failed, ASP assumes no Global.asa file exists in the mapped virtual root and does not attempt to load and compile the global.asa file.

ASP files that use Session and Application objects defined in a secure Global.asa file fail because the Global.asa file never gets compiled. All values and objects that would have been created in the Global.asa file are not available.

↑ Back to the top


Resolution

The Asp.dll file was modified to load and compile the Global.asa file after client authentication has been granted.

↑ Back to the top


Status

Microsoft has confirmed this to be a problem in Microsoft Active Server Pages version 1.0b. A supported fix is now available, but is not fully regression-tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Product Support Services for more information. This behavior is by design.

↑ Back to the top


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:

↑ Back to the top


Keywords: kbqfe, kbaspobj, kbbug, kbdatabase, kberrmsg, kbpending, kbwebserver, kbhotfixserver, KB172864

↑ Back to the top

Article Info
Article ID : 172864
Revision : 5
Created on : 5/2/2006
Published on : 5/2/2006
Exists online : False
Views : 404