PRB: Session Variables Are Lost in ASP Web Applications (303881)
The information in this article applies to:
- Microsoft Active Server Pages
This article was previously published under Q303881 SYMPTOMS
Active Server Pages (ASP) Session variables may not be persisted across requests in the same Web application. This behavior occurs in Web applications that contain the Global.asa file.
You may also receive the following error message:
HTTP 500-12 Application Restarting
CAUSE
This problem can be caused by any anti-virus software that scans the Web application files. It can also be caused by backup software that runs on those files. During each of these processes, if the Global.asa file is marked as modified, it prompts Microsoft Internet Information Services (IIS) to recompile the Global.asa file and then restart the Web application.
RESOLUTION
To resolve this problem, turn off virus scanning or file backup on the Global.asa file. For additional information about the third-party software, contact technical support for the company that produces the software.
STATUS
This behavior is by design.MORE INFORMATION
When IIS detects changes to the Global.asa file, the server finishes processing all of the current application requests before it recompiles the Global.asa file. During that time, the server refuses additional requests and returns an error message, which states that the request cannot be processed while the Web application is restarting.
After all of the current user requests have been processed, the server deletes all active sessions, calls the Session_OnEnd event for each session that it deletes, closes the application, and then calls the Application_OnEnd event. The Global.asa file is then recompiled.
Subsequent user requests will start the application and create new sessions, which trigger the Application_OnStart and Session_OnStart events. Thus, all previously set ASP Session variables are lost.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
248013 Err Msg: HTTP Error 500-12 Application Restarting
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Modification Type: | Minor | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbASPObj kbprb kbWebServer KB303881 |
---|
|