Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


InProc Session states & IIS Recycling

Posted on 2011-10-04
Medium Priority
Last Modified: 2012-05-12
Hi All,

I have developed a web application which relies on Session states to authenticate approx 20 users.

In IIS7, could you confirm that whether the Recycling - > Regular Time Interval will actually kill all sessions states?

If it does then if I was to configure this setting to 0, what are the implications?


Question by:rito1
LVL 17

Accepted Solution

Rovastar earned 2000 total points
ID: 36911346
Recycling the app pool will destroy the session for InProc.

More info here:

In theory you can have not recycle your app pool (set to 0). Recycling cleans up and tidies anything in the app could generate, memory leak, etc

There are 2 schools of thought in the IIS admin world

a) Recycle the app pools daily. Off peak. (default every 29 hours which will recycle in peak hours sometimes - that is silly) Keeps everything in tip top form daily.

b) Never recycle app pools. The devs should have perfect working code and if it is not working perfectly that we fix it.

Personally I am in the a) camp.

All that said app pools could recycle for other reasons than a scheduled restart. An actual probelm with something you want to automatically recover.

In this case you might want to still keep you session information.
If you need persistent session management than store you session in a persistent state. State Server or SQL server rather than In Process. There is no real need to have inProc for these cases and the benefits out way the drawbacks.
Also if you scale to a farm you should look at this option more so.
Hope that helps.

Author Comment

ID: 36915302
Thanks Rovastar, that is a great response.

I am going to implement Cookies to give me reassurance on this occassion.



Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question