S
stewartfip
My global.asax file looks something like this:
sub Session_Start()
[some database activity]
session("sessionID") = [value from cmd output param]
end sub
sub Application_PreRequestHandlerExecute()
if session("sessionID") <> 0 then
[do some stuff]
end if
end sub
....which seems to have worked fine up until this weekend. I have a
simple routine that e-mails application errors to me and I've been
HAMMERED suddenly with 'Session state is not available in this context'
on the line that reads 'if session("sessionID") <> 0 then...' which
doesn't make sense because Application_PreRequestHandlerExecute was
supposed to be a safe place to mess around with session variables.
So I'm at a loss in terms of where to begin troubleshooting this
problem. Am I referencing session variables in too simple a manner?
At this point, I'm not clear if this is happening to a given user on
every page, or if it just happens on their first page view and then
things are fine thereafter. I get an error every, oh, three minutes.
So it's happening a lot.
I'll provide more details, just tell me what you need to know. I'm
reasonably new to ASP.Net and am using VB, if that wasn't completely
obvious.
sub Session_Start()
[some database activity]
session("sessionID") = [value from cmd output param]
end sub
sub Application_PreRequestHandlerExecute()
if session("sessionID") <> 0 then
[do some stuff]
end if
end sub
....which seems to have worked fine up until this weekend. I have a
simple routine that e-mails application errors to me and I've been
HAMMERED suddenly with 'Session state is not available in this context'
on the line that reads 'if session("sessionID") <> 0 then...' which
doesn't make sense because Application_PreRequestHandlerExecute was
supposed to be a safe place to mess around with session variables.
So I'm at a loss in terms of where to begin troubleshooting this
problem. Am I referencing session variables in too simple a manner?
At this point, I'm not clear if this is happening to a given user on
every page, or if it just happens on their first page view and then
things are fine thereafter. I get an error every, oh, three minutes.
So it's happening a lot.
I'll provide more details, just tell me what you need to know. I'm
reasonably new to ASP.Net and am using VB, if that wasn't completely
obvious.