Losing session variables

M

M

Have you come accross the issue described below or know more about it?

We have come accross a situation where session variables are getting
lost temporarily but come back again if user reloads the same page.

Found that whenever the server has to load/compile (not sure which) the
website dlls (for eg the first time a page is requested from a website) and
if the browser makes a subsequent request for another page (for eg the first
page contains an iframe) then the session variables are not visible in the
second page. Strangely the session variables become visible if the browser
re-submits the request. Normally the compile/load process only happens the
first time a page is accessed but our virus scanner appears to be amending
some file in the website (web.config perhaps) and so the web server
re-loads/re-compiles the dll's quite frequently.

We have got around this by not using an iframe in the offending page and
excluding the website directory (for now) in the virus scanner.
 
A

Alvin Bruney

That is the correct behavior. Session objects are mapped into the same app
domain process space of which the page request is being served. Therefor
session variables will be susceptible to process recycling and app domain
unloads. You've taken the appropriate action here. All should be well. The
iframe part should not have any effect on session values, but keeping the
virus scanner away from the webconfig files is the cure. Also keep the
indexing service away from that directory as well.
 
M

M

Thanks Alvin, was useful to get some confirmation about this. I will also
look into the tip about the indexing service.
 

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,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top