Session resetting

  • Thread starter Thread starter No One
  • Start date Start date
N

No One

This seems to be related to the ViewState error that is now starting to
plague ASP.Net apps. When the Application Pool is recycled, the Session
seems to be getting reset. When this is done, session information is
lost and my app forgets what rules a user has. I'd rather not recode to
read this from the database for every page, but I wonder if I have no
other choice. Anyone else notice the Session resetting?
 
The ASP.NET worker process recycles for various reasons and it happens more
often that people would expect. You have to design/code for it, including
the possibility of InProc session being lost. To save session, keep it out
of the worker process via the State Server or the Sql DB, or just don't use
Session state which is somtimes possible, depending upon what you're doing.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
How do I use State Server or SQL DB?

Once a user is logged in, is there any other way of knowing who they
are? I have a roles (not rules...typo) based system where each role is
assigned various privileges. Certain pages require certain privileges
and so do certain controls.

Thanks.
 
This is just a setting in the web.config. If you want to use State Server be
sure that the service is running (ASP.NET State Service), if SQL Server is
your choice run InstallSQLState.sql in
windows\Microsoft.NET\Framework\VERSION\ once.

HTHs

Daniel
 
Back
Top