By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,289 Members | 1,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,289 IT Pros & Developers. It's quick & easy.

Please explain the inability to access the Session object

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.