Try using the Application_Error() event in Global.asax.
The context of the error will be available here. Your
application is handling the error, and thus there is no
LastError to Get.
hth,
-Christopher
http://weblogs.asp.net/CFrazierUsing Application_Error() does work. Thank-you!!!
What's confusing though is that I am simply trying to work
through an example on page 292 in "Developing WEB
Applications with Microsoft Visual Basic .NET and Visual
C# .NET". This example works with Server.GetLastError().
Perhaps book is wrong?
>--Original Message--
>Try using the Application_Error() event in Global.asax.
>The context of the error will be available here. Your
>application is handling the error, and thus there is no
>LastError to Get.
>hth,
>-Christopher
>http://weblogs.asp.net/CFrazier
>.
Showing posts with label application_error. Show all posts
Showing posts with label application_error. Show all posts
Thursday, March 22, 2012
Server.GetLastError() in a Web Farm
If I am handling errors in my Global.Asax Application_Error method and this
resides on a web farm and I am trying to trap the last exception that was
thrown, I assume that Server.GetLastError() will only check for the last
error on the current server. What if I was redirected via load balancing to
a different server. How do I accomidate for this?If an exception occured, how would you get redirected to a different server?
resides on a web farm and I am trying to trap the last exception that was
thrown, I assume that Server.GetLastError() will only check for the last
error on the current server. What if I was redirected via load balancing to
a different server. How do I accomidate for this?If an exception occured, how would you get redirected to a different server?
Exception Occurs
local error handling
page error handling
global error handling
there's no redirection happening...it all happens in a single thread...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Daniel Williams" <Daniel Williams@.discussions.microsoft.com> wrote in
message news:79CDFA4C-0E4E-41D1-8F1E-AF3CF66DF570@.microsoft.com...
> If I am handling errors in my Global.Asax Application_Error method and
this
> resides on a web farm and I am trying to trap the last exception that was
> thrown, I assume that Server.GetLastError() will only check for the last
> error on the current server. What if I was redirected via load balancing
to
> a different server. How do I accomidate for this?
Labels:
application_error,
asax,
asp,
errors,
exception,
farm,
global,
handling,
method,
net,
servergetlasterror,
thisresides,
trap,
web
Server.GetLastError() in a Web Farm
If I am handling errors in my Global.Asax Application_Error method and this
resides on a web farm and I am trying to trap the last exception that was
thrown, I assume that Server.GetLastError() will only check for the last
error on the current server. What if I was redirected via load balancing to
a different server. How do I accomidate for this?If an exception occured, how would you get redirected to a different server?
Exception Occurs
local error handling
page error handling
global error handling
there's no redirection happening...it all happens in a single thread...
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Daniel Williams" <Daniel Williams@.discussions.microsoft.com> wrote in
message news:79CDFA4C-0E4E-41D1-8F1E-AF3CF66DF570@.microsoft.com...
> If I am handling errors in my Global.Asax Application_Error method and
this
> resides on a web farm and I am trying to trap the last exception that was
> thrown, I assume that Server.GetLastError() will only check for the last
> error on the current server. What if I was redirected via load balancing
to
> a different server. How do I accomidate for this?
resides on a web farm and I am trying to trap the last exception that was
thrown, I assume that Server.GetLastError() will only check for the last
error on the current server. What if I was redirected via load balancing to
a different server. How do I accomidate for this?If an exception occured, how would you get redirected to a different server?
Exception Occurs
local error handling
page error handling
global error handling
there's no redirection happening...it all happens in a single thread...
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Daniel Williams" <Daniel Williams@.discussions.microsoft.com> wrote in
message news:79CDFA4C-0E4E-41D1-8F1E-AF3CF66DF570@.microsoft.com...
> If I am handling errors in my Global.Asax Application_Error method and
this
> resides on a web farm and I am trying to trap the last exception that was
> thrown, I assume that Server.GetLastError() will only check for the last
> error on the current server. What if I was redirected via load balancing
to
> a different server. How do I accomidate for this?
Labels:
application_error,
asax,
asp,
errors,
exception,
farm,
global,
handling,
method,
net,
servergetlasterror,
thisresides,
trap,
web
Subscribe to:
Posts (Atom)