Search code examples
c#asp.nethttpmodule

HTTP module session not being set in extensionless page


I have a HTTP module that I have written that needs to access the session. I have done the following:

  • Module is registered in web.config
  • Module attaches my method call to the PostAcquireRequestState event
  • The module implement IRequiresSessionState

However, when my page doesn't have an extension (i.e. as when htp://www.mywebsite.com) the session is not available and my code fails. If the page does have an aspx extension then all is ok.


Solution

  • It turns out its an II7 issue, see here:

    http://forum.umbraco.org/yaf_postst9997_ContextSession-always-null-on-top-umbraco-page.aspx