Session Variables disappear

  • Thread starter Thread starter Frank Schumacher
  • Start date Start date
F

Frank Schumacher

Hi NG,

I have a weird problem, that's starting to get my sanity.

My webapplication stores several values in Session["xxx"]. After a
server roundtrip, no Session variables exist anymore (Session.Count is 0)

I have logged the Session.SessionID, it is the same as before.

I have logged the last and the first line of code in my Codebehind. When
I leave the code the first time, I have a total number of 18 Session
Variables. When I enter the site again, I have 0 Session Variables.

The session timeout is 20 minutes and sessions are activates in IIS (6.0)

There is no Session.Abandon in the code.

The worst thing, I have a previous version of the webapp, which works
fine. From this version to the problematic one, I have just changed the
html-Code and added the use of the QueryString to initialize the app.

I even have uninstalled the .NET update, that hit us yesterday, cause
yesterday everything worked fine.

Not to mention, that I need to present the project next monday.

I have no ideas left anymore, if anyone could help me out, it would be
great.

Thanks in advance,
Frank
 
Frank Schumacher said:
Hi NG,

I have a weird problem, that's starting to get my sanity.

My webapplication stores several values in Session["xxx"]. After a server
roundtrip, no Session variables exist anymore (Session.Count is 0)

I have logged the Session.SessionID, it is the same as before.

Every time any process touches the web.config, the application is restarted,
and all the sessions are killed. Make sure no other process (like a virus
scanner) is touching your web.config.

David
 
Hi David
I have a weird problem, that's starting to get my sanity.

My webapplication stores several values in Session["xxx"]. After a server
roundtrip, no Session variables exist anymore (Session.Count is 0)

I have logged the Session.SessionID, it is the same as before.


Every time any process touches the web.config, the application is restarted,
and all the sessions are killed. Make sure no other process (like a virus
scanner) is touching your web.config.

thanks for your reply. I have disabled the virus scanner, but the
problem persists.
I have checked the properties of the Web.config imediate after testing
the webapp and last access was 15 minutes before.
I use my Web.config to store some appSettings, but I only read them.

Thanks anyway,
Frank
 
How often is IIS recycling your app?

MattC

Frank Schumacher said:
Hi David
I have a weird problem, that's starting to get my sanity.

My webapplication stores several values in Session["xxx"]. After a server
roundtrip, no Session variables exist anymore (Session.Count is 0)

I have logged the Session.SessionID, it is the same as before.


Every time any process touches the web.config, the application is
restarted, and all the sessions are killed. Make sure no other process
(like a virus scanner) is touching your web.config.

thanks for your reply. I have disabled the virus scanner, but the problem
persists.
I have checked the properties of the Web.config imediate after testing the
webapp and last access was 15 minutes before.
I use my Web.config to store some appSettings, but I only read them.

Thanks anyway,
Frank
 
David,

re:
Every time any process touches the web.config, the application is
restarted, Make sure no other process (like a virus scanner) is touching
your web.config.

A virus scanner does *not* "touch" a web.config
file in such a way as to change its file date,
which is the trigger for restarting applications.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================

David Browne said:
Frank Schumacher said:
Hi NG,

I have a weird problem, that's starting to get my sanity.

My webapplication stores several values in Session["xxx"]. After a server
roundtrip, no Session variables exist anymore (Session.Count is 0)

I have logged the Session.SessionID, it is the same as before.
 
Hi MattC,
How often is IIS recycling your app?

I have checked the properties of the application pool in which my webapp
is running. Reuse is: workerprocess reuse in 1740 minutes.

I don't know, if I translate it correctly, cause I have a german version
of IIS.

Thanks,
Frank
Hi David

I have a weird problem, that's starting to get my sanity.

My webapplication stores several values in Session["xxx"]. After a server
roundtrip, no Session variables exist anymore (Session.Count is 0)

I have logged the Session.SessionID, it is the same as before.
 
Juan T. Llibre said:
David,

re:

A virus scanner does *not* "touch" a web.config
file in such a way as to change its file date,
which is the trigger for restarting applications.

Some do. In particular some virus scanners use NTFS alternate file streams
to store information about the scan status of files. Writing data to an
alternate file stream generates the same file change notification as writing
to the primary stream. This causes ASP.NET to shut down the application.

David
 
heh, heh...

Please identify them...so I know
which virus scanners *not* to buy.

That's wicked behavior.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=====================
 

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

Back
Top