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.
Found this blog post which explains the problem I as having.