Re: session variable getting lost
- From: "SAL" <SAL@xxxxxxxxxxxxx>
- Date: Thu, 15 Nov 2007 11:12:14 -0800
kpg,
what I figured out was the app was getting recycled due to a limit I had set
on virtual memory. There are times when the virtual memory usage jumps up
dramatically and then it pops right back down. The app does not appear to be
leaking memory at this time. So, I unchecked that option in the App pool's
configuration.
I used information garnered from this link to aid me in my quest, although I
haven't completely implemented Peter's Exception Engine.
http://www.eggheadcafe.com/articles/20030816.asp
I placed this code in my Application_Error routine in my Global.asax file:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
' check to see if the ASPNETApplication log exists
Dim b As Boolean
Try
b =
Convert.ToBoolean(ConfigurationManager.AppSettings("logAppErrors"))
Catch ex As Exception
End Try
If Not b Then Exit Sub
If Not System.Diagnostics.EventLog. _
SourceExists("AnnexationTrackerApplication") Then
System.Diagnostics.EventLog. _
CreateEventSource("AnnexationTrackerApplication",
"Application")
End If
System.Diagnostics.EventLog. _
WriteEntry("AnnexationTrackerApplication",
Server.GetLastError().GetBaseException().Message)
End Sub
The message appeared in the system event log not the application event log.
HTH
S
"kpg*" <no@xxxxxxxx> wrote in message
news:Xns99E27E9E22F89ipostthereforeiam@xxxxxxxxxxxxxxxx
"SAL" <SAL@xxxxxxxxxxxxx> wrote in
news:uFUwqXiIIHA.6108@xxxxxxxxxxxxxxxxxxxx:
Thank you for your reply and the article link.
I am currently investigating George's suggestion as well
Please post back here if (and when) you find the culprit.
I have stopped using sesion variables altogether becuase of
similar issues on a client's server, but am very interested
in what you figure out.
Now my client may well be changing the web.config file
which will cause the application to restart, all the more
reason to not use session varialbes (in my case).
Instead I pass info encrypted in the query string, which
works just fine, the only session variable I use is to
relay error messages to tan error page - if that gets
lost, oh well.
kpg
.
- References:
- session variable getting lost
- From: SAL
- Re: session variable getting lost
- From: Mark Rae [MVP]
- Re: session variable getting lost
- From: SAL
- Re: session variable getting lost
- From: SAL
- Re: session variable getting lost
- From: "Walter Wang [MSFT]"
- Re: session variable getting lost
- From: SAL
- Re: session variable getting lost
- From: kpg*
- session variable getting lost
- Prev by Date: Re: Create Code
- Next by Date: Re: Redirecting Users: Please Help.
- Previous by thread: Re: session variable getting lost
- Next by thread: Re: session variable getting lost
- Index(es):
Relevant Pages
|