Microsoft Knowledge Base Email Alertz

(303881) - 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...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 303881 - Last Review: December 10, 2003 - Revision: 1.1

PRB: Session Variables Are Lost in ASP Web Applications

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.

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
248013  (http://kbalertz.com/Feedback.aspx?kbNumber=248013/EN-US/ ) 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.

APPLIES TO
  • Microsoft Active Server Pages 4.0
Keywords: 
kbaspobj kbprb kbwebserver KB303881
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate