I am trying to implement a session-per-request pattern in an ASP.NET MVC 2 Preview 1 application, and I\'ve implemented an IHttpModule to help me do this:
You might have to put the Response.Write in the method that subscribes to the EndRequest (or the BeginRequest) event. I'm guessing the Response object hasn't been fully initialized at the Init stage.