Linked Questions

78 votes
10 answers
72k views

In a old site, I was changing the way that CustomErrors works by adding redirectMode="ResponseRewrite" (new in 3.5 SP1): <customErrors mode="RemoteOnly" defaultRedirect="Error.aspx" redirectMode="...
Eduardo Molteni's user avatar
44 votes
2 answers
76k views

For a project I am working on, one of the things we're implementing is something that we have code for in some of my teams older ASP.NET and MVC projects - an Application_Error exception catcher that ...
Andrew Gray's user avatar
  • 3,790
39 votes
4 answers
17k views

I've been struggling all day to implement error handling in my ASP.NET MVC 2 app. I've looked at a variety of techniques, but none work properly. I'm using MVC2 and .NET 4.0 (started the project ...
Val's user avatar
  • 2,333
17 votes
4 answers
23k views

My global.asax seems not to be firing. I have: void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs Server.Transfer("~/ExceptionFormView....
Patrick From An IBank's user avatar
13 votes
1 answer
23k views

If you have custom errors set to RemoteOnly in web config - does this mean that MVC's application level error event in global.asax - Application_Error is not fired on error? I have just noticed that ...
jcvandan's user avatar
  • 14.4k
2 votes
3 answers
4k views

I know that in ASP.NET people typically put a protected method called "Application_Error" in their global.asax file inorder to handle say, logging of exceptions. My question is, is this an ASP.NET ...
KingNestor's user avatar
  • 68.4k
0 votes
1 answer
2k views

Last year, we moved our web applications to a new server. Here are the system/application configuration specs prior to the move: Windows Server 2003 IIS 6.0 ASP.NET 4.0 WebForms Here are the specs ...
oscilatingcretin's user avatar
0 votes
2 answers
2k views

When testing my ASP.NET MVC 3 app in Internet Explorer 9, I get the generic "Internet Explorer cannot display the webpage" error instead of the Yellow Screen. The errors get thrown to the Event ...
Brian David Berman's user avatar
3 votes
4 answers
773 views

I have an issue with the current project I am working on. The developers have added multiple catch blocks for a try block. Each catch is logging the error and then re-throwing it. Something like this: ...
Kenshin's user avatar
  • 111
0 votes
1 answer
979 views

I have this quite strange problem: When I go to a URL which doesn't exist on my website, it simply shows a white page. The Application_Error event is never run, and the user is not transfered to the ...
Lars Holdgaard's user avatar
2 votes
1 answer
554 views

I have a redirect on global.asax application_error function. When i'm debugging, every exception is treated by the function. When i am running application on web server, appears the error default page ...
Sérgio Pinto's user avatar
0 votes
1 answer
347 views

I am using MVC4, and would like to be able to throw HttpExceptions from a ontroller, and handle those in a seperate controler. I have set up <customErrors mode="On" defaultRedirect="/Error"/> ...
Martijn's user avatar
  • 12.2k
0 votes
1 answer
220 views

I have the following to handle errors on an ASP.NET MVC 5 application: protected void Application_Error() { var exception = Server.GetLastError(); var httpException = exception as HttpException; ...
Miguel Moura's user avatar
1 vote
0 answers
222 views

Application_Error event is not firing on production server, this production server having Load Balancer. Application_Error event is firing and running well on QA and DEV server only issue is there on ...
Yash's user avatar
  • 191
0 votes
0 answers
73 views

I want to write custom errors and unexpected errors via Global.asax. In that method I use : var ex = Server.GetLastError(); to obtain the error which ocurred. However, this code is not hit (or ...
Rob's user avatar
  • 3,574