Asp.net Session

Asp.net Session

Facing a strange issue with asp.net web application.The session values are getting lost.    
The most common reason for losing session data is that your AppPool has recycled. 
If you are string sesion in process, during application pool recycling you will loose session values.

The fix is to switch to out-of-process session state, such as SQL Server, or to avoid using session state entirely. 
In the interim, you can disable AppPool timeouts, but it's not advisable for the long term.

If you are using web garden, you need to use either SQL server or state server to store your session variables.
Don;t forget to mark classess whose objects are getting stored in session an attribute serializable.
As application is crossing the boundries of application domain.

Asp.net Session TimeoutIRequiresSessionState and sessionAsp.net SessionSessions In AspnetAsp.net Interview Questions for 2 years or 3 years experianceAsp.net Session AbandonSession application viewstateSession Loss In WebgardenWhat is web garden in Asp.net?How to implement Captcha in Asp.netasp net image upload

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.