473,396 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HttpServerUtility.GetLastError Timing issue?

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.
Nov 18 '05 #1
1 1677
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)
"Brendan Erwin" <be****@info1team.com> wrote in message
news:0c****************************@phx.gbl...
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.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: SilverlineDesign | last post by:
I am having trouble using Server.GetLastError() on my asp.net pages. I defines a standard error page in my web.config to handle all site errors, but the page that is supposed to handle the error...
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
7
by: Jacob Barnett | last post by:
Access 2000 main report does not display subreport data in preview and may or may not print... sometimes. Usually, the entire report is fine. The behavior does not seem to depend on particular...
4
by: Brian Hanson | last post by:
Hi, I have a problem that is sporadic and am thinking it may come down to a timing issue. I have an asp.net (vb) app that used the system.io.file.copy method to copy a .pdf file from a network...
2
by: Lars Netzel | last post by:
I'm trying to make my own custom error page... but when using Try lblErrormessage.Text = Server.GetLastError.Message lblErrormessage.Text += "<br>" & Server.GetLastError.StackTrace ...
1
by: robertlair | last post by:
I am having issues with a production server with the GetLastError() method. Here is what I am doing: Application_Error on Global ASAX: Note: I am doing it this way (with ClearError) because...
2
by: Alexander | last post by:
I wanna to transfer from one HttpHandler (HttpModule) to another one. When I doing HttpContext.Current.Server.Transfer("~/OtherHandler.ashx") from my handler I see: ...
2
by: Patrick F | last post by:
I have a dll file that i am trying to use the Server.Encode function. so i have added a reference to System.Web; but when im trying to delcare: HttpServerUtility mServer = new...
2
by: julie.siebel | last post by:
Google apparently ate my original post to this (grr) so this'll be a bit more vague than the initial post, but...*sigh*. Javascript is not my forte, and I apologize for the acky-ness of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.