Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Global.asa, AcquireRequestState and Session

Reply
Thread Tools

Global.asa, AcquireRequestState and Session

 
 
Raghu
Guest
Posts: n/a
 
      02-17-2005
The global.asax page can have an event handler for AcquireRequestState. This
is where a session can be accessed for the first time before the control
ends up in the target page itself.

However if the target page has its EnableSession property set to false, then
the Session property can not be accessed (either in the page or in
Global.asax) as there will be no session. In such case, if Session property
is accessed, the HttpException (with message: Session is not valid in this
context) is thrown.

Is there a programmatic way (that does not include catching exception) of
detecting if currently executing page has the session disabled in the
global.asax?

Thanks.
Raghu/..


 
Reply With Quote
 
 
 
 
Raghu
Guest
Posts: n/a
 
      02-17-2005
Landed on the solution right after sending this this message.

Context.Session will be null for the pages that disabled session state.

Thanks.
Raghu/..

"Raghu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The global.asax page can have an event handler for AcquireRequestState.

This
> is where a session can be accessed for the first time before the control
> ends up in the target page itself.
>
> However if the target page has its EnableSession property set to false,

then
> the Session property can not be accessed (either in the page or in
> Global.asax) as there will be no session. In such case, if Session

property
> is accessed, the HttpException (with message: Session is not valid in this
> context) is thrown.
>
> Is there a programmatic way (that does not include catching exception) of
> detecting if currently executing page has the session disabled in the
> global.asax?
>
> Thanks.
> Raghu/..
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Session Variables Seems Really Slow in AcquireRequestState Phil Johnson ASP .Net 0 07-20-2009 01:26 PM
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
Why would AcquireRequestState fire multiple times? =?Utf-8?B?SGFycnkgS2Vjaw==?= ASP .Net 0 09-29-2006 08:34 PM
Slow AcquireRequestState =?Utf-8?B?Sm9lbCBBdWZnYW5n?= ASP .Net 0 05-12-2006 05:35 PM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM



Advertisments