November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Yeah, my collegues, who are developing this site, ran into that problem just the other day. This is due to, as I understood it, changes in the IIS. Instead of attaching to the event in Application_Start they had to run their code as a http module.
I'll see if I can get you some code later today.
Here's some sample code. Hope it helps.
public class EventHandler : IHttpModule
{
private static bool _isInited = false;
private static string locker = "1";
public void Init(HttpApplication context)
{
lock (locker)
{
if (!_isInited)
{
EPiServer.DataFactory.Instance.CreatingPage += new PageEventHandler(Instance_CreatingPage);
//...
_isInited = true;
}
}
}
}
Hi, trying to attach an event in my global.asax
DataFactory.Instance.LoadedDefaultPageData += new PageEventHandler(Instance_LoadedDefaultPageData);
Works fine och test-server and live, but not on my computer (Running vista business sp1).
Error msg:
Request is not available in this context
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Web.HttpException: Request is not available in this context
Source Error: