Had a beauty the other day, trying to figure out why a small company intranet app suddenly had time out issues. Turned out to be a http module wasn’t loading any more. This module hooked into the EndRequest event and was responsible for committing any outstanding database transactions and closing the connection from the data layer.
The website was small and mostly readonly from the database except for 1 button which was used by IT admins, and not very often at that. By the time someone responded to a call about it, the blocking spid would have dropped and the site was responsive again.
The website had recently been moved onto a new server and now running IIS 7.
Registering the module in the new section <system.webServer> instead of <system.web> got the code running.
See https://msdn.microsoft.com/en-us/library/vstudio/ms227673(v=vs.100).aspx for a nice walkthrough for registering a Custom HTTP Module.