I have an ASP.NET Web Application project that used to target ASP.NET 2.0. I installed ASP.NET 4.0 on the web server hosting the web application and changed the web application project to target .NET 4.0. Everything works ok with on exception: Custom Error Handling
Before migrating to .NET 4.0, custom errors used to work. In my application I have a Global.asax page with a global application error handler which works fine on my development environment (and worked just fine with .NET 2.0 on the server as well) which doesn't work with the new IIS 7 with .NET 4.0 setup. I also have a customErrors section in the web.config file which is supposed redirect the browser to a custom error page in case the error was such that even the global application handler would fail. That also works fine on my machine, but fails to do anything on the server. And I did try all three different settings for the mode attribute.
If anyone has any idea why this might be happening I'd appreciate any feedback!