Dec 11, 2012 at 2:25 PM
Edited Dec 11, 2012 at 2:27 PM
After updating to Orchard 1.6 from 1.5.1 my custom module started to throw the following exception:
System.InvalidOperationException: 'HttpContext.SetSessionStateBehavior' can only be invoked before 'HttpApplication.AcquireRequestState' event is raised.
Exception is being thrown in this line of Orchard.Mvc.Routes.ShellRoute:
// push provided session state behavior to underlying MvcHandler
I use telerik controls in my module and commenting out the style and script registars actually makes the exception to go away
@Html.Telerik().StyleSheetRegistrar().DefaultGroup(v => ...)
Also a second clue that I found is that when I'm running my website from ASP.NET Development Server instead of IIS it also makes the exception to go away (with telerik enabled)
Based on the Development Server vs. IIS findings I belive that this might be something with the IIS configuration but honestly I cannot see anything wrong
App pool: Integrated pipeline,.NET 4, Identity: Network Service with access to folder.