HttpServerUtility.GetLastError Timing issue?

B

Brendan Erwin

Looking for some clarification here. I'm considering using
HttpServerUtility.GetLastError in a standard errorhandler
for all my pages. (Inherits System.Web.UI.Page and
overrides OnError.) My concern is that I think there MAY
be a timing issue with the GetLastError method as it is a
method of the HttpSERVERUtility class.
When an exception is thrown within a page and triggers the
OnError method, how am I guaranteed that the exception
returned by GetLastError is the same exception that
triggered the OnError method? It seems to me, from the
location of the GetLastError method, that, if 2 pages
threw exceptions at just the right times, I could be
handling the wrong exceptions.
Thanks for any assistance.
 
B

bruce barker

there is no problem. aspx page processing is context bound, and the
GetLastError uses the current context to get the error message, simular to
the Session Cache.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top