1

I wrote a custom module that hooks into the Application_Error event of ASP.NET to write a user friendly error message instead of the YSOD. This works great on my development machine running on the built-in visual studio web server. When I move it over to IIS 7, my module is not even being invoked.

I did a failed request trace and it listed a VIRTUAL MODULE UNRESOLVED event for my (as well as a few others) module. So it seems like the module is not being found, but I can't find any information on this event in google.

awilinsk
  • 332
  • 4
  • 12
  • I found that one of my problems was a permissions issue. I was writing out to a log file on the c:\ drive and it didn't like that. I removed all of that code. It still doesn't work, but if I call HttpContext.Current.ClearError() my friendly error message displays correctly. I don't want to do this because it send the WebErrorEvent to HealthMonitoring and I don't get emailed. It seems IIS ignores the Response.End() call. – awilinsk Aug 25 '09 at 20:35

1 Answers1

1

Found this blog post which explains the problem I as having.

awilinsk
  • 332
  • 4
  • 12
  • It's like torture... Answers that only have links in them, and the links are now dead. – GaTechThomas Feb 13 '20 at 18:39
  • The blog post is now located at: https://docs.microsoft.com/en-us/archive/blogs/tmarq/correct-use-of-system-web-httpresponse-redirect – Krimson Dec 22 '20 at 07:32