Application.Error event does not fire on Windows Server 2008 R2 IIS 7.5 - by Owen37

Status : 


Sign in
to vote
ID 782650 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 3/29/2013 11:46:45 AM
Access Restriction Public


I have an httpModule that imlements the Application_Error event. On our workstations (Windows 7 Pro and Ultimate), this event is fired (and the sub called) when a 404 or 500 error is generated on the site.  However, when we install the website project on Windows Server 2008 R2 and generate one of those errors, the Application.Error event is NOT RAISED in the httpModule.

All other events in the httpModule seem to be being raised properly.
Sign in to post a comment.
Posted by Owen37 on 5/15/2013 at 10:21 AM
No answers yet on The really weird thing is that all other application events (beginRequest, authorizeRequest, etc) fire and are handled by the httpModule. The only event that is not firing is the Error event. ??
Posted by Owen37 on 4/23/2013 at 7:37 AM
Oh, I've already asked on ( and gotten responses that have not solved the issue as yet.
Posted by Owen37 on 4/23/2013 at 7:20 AM
That would be: <modules runAllManagedModulesForAllRequests="true">
Posted by Owen37 on 4/23/2013 at 7:19 AM
I already have "runAllManagedModulesForAllRequests=true" in my web.config file....
Posted by Damian [MSFT] on 4/22/2013 at 3:34 PM
This looks like it's likely an environmental configuration issue given that it works locally on your developer machines but not on your target server. Please ask this question in the ASP.NET forums at

One thing to note is that if you're running the Visual Studio Development server locally (aka Cassini) then 404's for static file requests will result in the application error logic being hit, however this is not the case on IIS unless you have RAMMFAR (RunAllManagedModulesForAllRequests) enabled in your web.config file.
Posted by Owen37 on 4/15/2013 at 3:31 PM
Also, the problem is not reproducible on my Windows 7 development box. It only starts happening when I move the project to our development (or production) Windows Server 2008 R2 boxes.
Posted by Owen37 on 4/15/2013 at 3:26 PM
What entries did you remove/Change? What errors are you seeing?

Why is web.config so touchy? The web.config I sent with the project is pretty minimal compared to our actual site.
Posted by Jon [MSFT] on 4/15/2013 at 3:15 PM
We took a look at the provided repro of the problem but ran into some errors in the configuration file. We removed those problematic configuration entries, but were not able to reproduce the issue after our changes. Please submit a minimal repro of the problem so that we can be sure we are working with an accurate representation of your issue.
Posted by Microsoft on 4/5/2013 at 3:29 AM
Hi Owen37, thanks for your response. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Owen37 on 4/3/2013 at 8:18 AM
I've uploaded a zip file of the directory of the website project (to Microsoft Only)...
Posted by Owen37 on 4/3/2013 at 8:16 AM
How/Where do I post the demo project? I have a simple project that works (all events fire, even error) on Windows 7 Ultimate but the error event does not fire on Windows Server 2008 R2.
Posted by Microsoft on 4/1/2013 at 2:00 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting a demo project. We look forward to hearing from you with this information.
Posted by Microsoft on 3/29/2013 at 11:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(