Sunday, October 11, 2009

SPContext in HTTP Module

Got the 'System.InvalidOperationException' when accessing SPContext in your HTTP Module? To solve this, make sure you attach your eventhandler to the application.PreRequestHandlerExecute event instead of the application.BeginRequest event.