Re: session variable getting lost

Tech-Archive recommends: Fix windows errors by optimizing your registry



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


.



Relevant Pages

  • Re: Beating the dreaded rainbow pinwheel
    ... everything is slowing down even when there are few ... %CPU and Virtual Memory columns. ... If any app is using an unusually large ... amount of CPU time or virtual memory, ...
    (comp.sys.mac.system)
  • minimal thread stack size
    ... the goal for the customer is to avoid at most development on the app (in ... The nb of thread per process limitation is only linked to the virtual memory ... This seems to mean that our thread stack ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Dbase development & tutorials
    ... > # app, does anyone know of some tutorials about this matter? ... > and virtual memory, you may be able to keep tables in memory. ... > then use stdio functions and build up the functionality you need from ...
    (comp.lang.c)