Question

I'm implementing a custom ASP.NET MVC controller factory.

I wonder when the ReleaseController method is called? Is it the same time as EndRequest?

Was it helpful?

Solution

This is happens when EndProcessRequest(IAsyncResult asyncResult) method of MvcHandler class is called.

asyncResult contains delegate wich been prepared by

IAsyncResult BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, object state)

method of same class wich contains factory.ReleaseController(...); call.

This is happens before Application_EndRequest (in Global.asax) is called.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top