InProc Session states & IIS Recycling

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?

Thanks,

Rit
LVL 1
rito1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RovastarCommented:
Recycling the app pool will destroy the session for InProc.

More info here:
http://blogs.msdn.com/b/webtopics/archive/2009/07/22/in-proc-session-state-management.aspx


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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rito1Author Commented:
Thanks Rovastar, that is a great response.

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

Thanks,

Rit
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.