ASP Pages Fail on Access to Session and Application Objects

Last reviewed: December 11, 1997
Article ID: Q172864
The information in this article applies to:
  • Microsoft Active Server Pages version 1.0b

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

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.

RESOLUTION

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

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.

REFERENCES

For the latest Knowledge Base artices 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/support/vinterdev/


Additional query words: prodnt
Keywords : AXSFConfig kberrmsg kbbug1.00b
Version : 1.00b
Platform : winnt
Hardware : ALPHA x86
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.