Please explain the inability to access the Session object

  • Thread starter Thread starter VijayShankar
  • Start date Start date
V

VijayShankar

Can u be more specific on your question

Anyway its not like Session variables are available for
sometime and not available for sometime.

When your session starts it is very much available unless
your session ends

One more thing Session variables can very much be used in
Application events

If u explain ur question with a small illustration may be
i can try to figure out your question and try to give reply

-----Original Message-----
OK, can someone provide me with a logicaland architecual reason why
the Session object is only available sometimes??? OK, I understand
why BEFORE the Session_Start event happens that a session object can't
exist, but why not in other events? OK, OK yes on the FIRST request
ever, maybe the session object wouldn't exist in
Application_BeginRequest or
Application_AuthenticateRequest but let's
 
Access to Session object does not seem possible in Application Events:


Application_AuthenticateRequest
Application_BeginRequest
Application_EndRequest

While I can access it in:

Application_AcquireRequestState


using Context.Session

i.e, Context.Session["Test"] = "test" does not work in first three events.
 
I've seen that post, it still doesn't explain why session object is
available in some requests and not others and why this has to be so.
Oh well....

Vijay Shankar said:
Please refer the link

http://www.dotnet247.com/247reference/msgs/24/121049.aspx

may be this could some how answer your query



-----Original Message-----
Access to Session object does not seem possible in Application Events:


Application_AuthenticateRequest
Application_BeginRequest
Application_EndRequest

While I can access it in:

Application_AcquireRequestState


using Context.Session

i.e, Context.Session["Test"] = "test" does not work in first three events.
.
 
Back
Top