Session resetting

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?
 
B

Brock Allen

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

No One

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

Daniel Walzenbach

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,242
Latest member
KendrickKo

Latest Threads

Top