I have a custom IHttpHandler that calls MvcHttpHandler implemented as described in this answer .
It worked well in asp.net MVC2, but after porting the code to MVC4 using IISExpress 7.5, I started getting an InvalidOperationException in the line:
httpHandler.ProcessRequest(HttpContext.Current);
with the message:
'HttpContext.SetSessionStateBehavior' can only be raised by the HttpApplication.AcquireRequestState event.
ASP.NET Development Server does not pose any problems.
Does anyone know what is going on here and how to solve it?
ni5ni6
source share