InProc Session states & IIS Recycling

Posted on 2011-10-04
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

    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.
    LVL 1

    Author Comment

    Thanks Rovastar, that is a great response.

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



    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now