Microsoft Knowledge Base Email Alertz

(835386) - Explains why you may lose session data because of application restarts if you use Group Policy on Web servers that host ASP.NET. This article also explains that Group Policy and ASP.NET use different approaches to enhance Web server security.

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: 835386 - Last Review: May 17, 2007 - Revision: 2.7

Session data is lost when you use Group Policy on Web servers that host ASP.NET

System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you. Visit the Windows Vista Solution Center

On This Page

SYMPTOMS

When you use Group Policy to manage the file security of Web servers that host Microsoft ASP.NET, unexpected application restarts may occur, and you may lose session data for your ASP.NET Web applications.

CAUSE

If ASP.NET detects changes to application files and configuration files, ASP.NET recompiles modules and restarts application domains for security reasons. Similarly, if ASP.NET detects a change in the Machine.config file, ASP.NET restarts the ASP.NET worker process for security reasons. Therefore, when Group Policy applies a file security Group Policy Object (GPO), ASP.NET may detect changes to application files or configuration files and then recompile modules or restart either application domains or the ASP.NET worker process. When ASP.NET recompiles modules or restarts either application domains or the ASP.NET worker process, in-process session data is lost.

This problem occurs if you use the InProc session state mode to store session data on a Web server that uses GPOs to manage file security. When Group Policy applies a GPO, ASP.NET detects changes in the access control lists (ACLs) for folders that contain application files or configuration files. Therefore, for security reasons, ASP.NET restarts ASP.NET Web applications, and you may lose in-process session data.

WORKAROUND

To work around this problem, use either of the following workarounds:

Do not use GPOs

Do not use GPOs to manage file security on Web servers that host ASP.NET. If you must use GPOs on the Web servers, make sure that you do not use the GPOs on those parts of the Web server that host ASP.NET and ASP.NET applications.

Do not use the InProc session state mode

Do not use the InProc session state mode to store session data. Instead, use either the StateServer session state mode or the SqlServer session state mode to store session data.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307598  (http://kbalertz.com/Feedback.aspx?kbNumber=307598/ ) INFO: ASP.NET state management overview

STATUS

This behavior is by design.

MORE INFORMATION

Both Group Policy and ASP.NET enhance Web server security. However, these two technologies (Group Policy and ASP.NET) use different approaches to enhance Web server security. Therefore, if you use these two technologies together, the problem that is mentioned in the "Symptoms" section of this article may occur.

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
324772  (http://kbalertz.com/Feedback.aspx?kbNumber=324772/ ) PRB: Session data is lost when you use ASP.NET InProc session state mode
For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
http://msdn2.microsoft.com/en-us/library/87069683(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/87069683(vs.71).aspx)

http://msdn2.microsoft.com/en-us/library/aa374177.aspx (http://msdn2.microsoft.com/en-us/library/aa374177.aspx)

http://msdn2.microsoft.com/en-us/library/aa374162.aspx (http://msdn2.microsoft.com/en-us/library/aa374162.aspx)

http://msdn2.microsoft.com/en-us/library/system.web.sessionstate.sessionstatemode.custom(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/system.web.sessionstate.sessionstatemode.custom(vs.71).aspx)

APPLIES TO
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows 2000 Server
Keywords: 
kbacl kbconfig kbwebserver kbgrppolicyprob kbpolicy kbstate kbprb KB835386
       

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

hiren - hirenbhirpara NOSPAM-AT-NOSPAM yahoo.com
Written: 3/8/2004 12:06 AM
thanks for giving such information. it will be really helpful for me while learning asp.net