470,594 Members | 1,491 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

Please explain the inability to access the Session object

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 whythe Session object is only available sometimes??? OK, I understandwhy BEFORE the Session_Start event happens that a session object can'texist, but why not in other events? OK, OK yes on the FIRST requestever, maybe the session object wouldn't exist in
Application_BeginRequest or Application_AuthenticateRequest but let'sface it, after the first request, we all know Session_Start HAS tohave been hit, so the session object does exist! So why can't we getat it in all these application events? Can someone please tell me 1)The logical reason why the Session object (which uh, I think, issuppose to track the entire http session) kind of comes and goes inasp.net and 2) the architectual reason why this behavior has to be.I'm getting fed up trying to figure out when the session object canand cannot be used (please, no diatribes why session object should notbe used) and why 'events' don't seems to understand that other'events' have happened.
.

Jul 19 '05 #1
3 2949
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.
Jul 19 '05 #2
Please refer the link

http://www.dotnet247.com/247referenc...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..

Jul 19 '05 #3
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" <kv******@cognizant.com> wrote in message news:<07****************************@phx.gbl>...
Please refer the link

http://www.dotnet247.com/247referenc...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.
.

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kris van der Mast | last post: by
4 posts views Thread by Christina N | last post: by
6 posts views Thread by David Lozzi | last post: by
3 posts views Thread by Shawn | last post: by
2 posts views Thread by William Sullivan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.