Please explain the inability to access the Session object

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
 
P

Patrich Lynch

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.
 
P

Patrich Lynch

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.
.
 

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

Top