What causes session to disappear? - gnewsgroup

19-Jan-08 12:49:50
In my asp.net 2.0 web application, in Web.config, I have

timeout="30", s l i d i n g E x p i r a t i o n = "true"

for the Authentication element.  I suppose, this means that as long as
we don't let a 30 min elapse without making any request, the session
should stay alive, right?

But I notice that quite often, the application throws out Null
reference exception where I try to access a session variable like so:

System.NullReferenceException: Object reference not set to an instance
of an object.

Apparently, the session variable is lost.

I am sure it is way before a 30 minutes' elapse without making any
request.

Question:

1. Do we lose the session if the project gets JIT-recompiled?

2. Do we lose the session if an Exception happens?

Thank you.
reply
What causes session to disappear? - gnewsgroup 19-Jan-08
        Re: What causes session to disappear? - Steve C. Orr [MCSD, MVP, CSM, ASP Insider] 18-Jan-08
                Re: What causes session to disappear? - zhaoj 19-Jan-08
                Re: What causes session to disappear? - gnewsgroup 19-Jan-08
        Re: What causes session to disappear? - Scott Roberts 18-Jan-08
                Re: What causes session to disappear? - Juan T. Llibre 18-Jan-08
                        Re: What causes session to disappear? - gnewsgroup 19-Jan-08
                Re: What causes session to disappear? - gnewsgroup 19-Jan-08

  

Search

search




Purchase