Tuesday, March 13, 2012

Session Variables disappear

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" <fs_nospam@.informatik.uni-leipzig.de> wrote in message
news:uDDknwEEFHA.2288@.TK2MSFTNGP14.phx.gbl...
> 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

>
> Every time any process touches the web.config, the application is restarte
d,
> 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" <fs_nospam@.informatik.uni-leipzig.de> wrote in message
news:%23k$Wz%23EEFHA.3728@.TK2MSFTNGP14.phx.gbl...
> Hi David
>
> 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 Espaol
=====================
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:%23p3EA4EEFHA.2572@.tk2msftngp13.phx.gbl...
> "Frank Schumacher" <fs_nospam@.informatik.uni-leipzig.de> wrote in message
> news:uDDknwEEFHA.2288@.TK2MSFTNGP14.phx.gbl...
> 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 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
> "Frank Schumacher" <fs_nospam@.informatik.uni-leipzig.de> wrote in message
> news:%23k$Wz%23EEFHA.3728@.TK2MSFTNGP14.phx.gbl...
>
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:%23oS6bJFEFHA.3944@.tk2msftngp13.phx.gbl...
> 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 Espaol
=====================
"David Browne" <davidbaxterbrowne no potted meat@.hotmail.com> wrote in
message news:eI1eTdFEFHA.2568@.TK2MSFTNGP10.phx.gbl...
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:%23oS6bJFEFHA.3944@.tk2msftngp13.phx.gbl...
> 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

0 comments:

Post a Comment