Changing file in App_Code clears session variables

E

E Barr

Hi,
When working in debug mode of Visual Studio 2005, whenever I make a change to one of my files in the App_Code directory, all of my session variables get cleared. This is annoying because it means I have to start the application from the beginning by re-logging in. The files in my App_Code directory are all static classes. so as far as I understand, they don't even use session variables. Does anyone know a way to keep this form happening, or is it "by design" for some reason

From http://www.developmentnow.com/g/8_2005_7_8_0_0/dotnet-framework-aspnet.h

Posted via DevelopmentNow.com Group
http://www.developmentnow.com
 
C

ca8msm

Yes, it's by design. If you make any changes to these files the app
domain will be recycled causing your session variables to clear.
 
S

Steve

I believe this is by design. Any time you change relevant (code related
files) files in the webapp directory, ASP.NET will recompile the
application. As a result of this, ALL sessions are closed. Any cached
variables (except ViewState) are deleted. You might be able to get
around this by saving SessionState outside of the process (like
StateServer or SQL).


Steve C.
MCAD,MCSE,MCP+I,CNE,CNA,CCNA
 
G

Guest

http://forums.asp.net/p/7504/7504.aspx
I believe that will answre alot of your questions.
Basically The short and simple answer is , you want any session mode except
InProc if you wish to avoid the loss of session when the app domain restarts
or the work process is recycled. StateServer is the next easiest one to use.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top