Can't access Request class from within Events extender
Hi all,
I followed the tutorial here and successfully created a .cs extension to umbraco that allowed me to hook into the backend pageload event.
I need to access the Request.ServerVariables object but when I try to I get the following exception:
Server Error in '/' Application.
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Request is not available in this context]
System.Web.UI.Page.get_Request() +11358594
MDetectPage.FireEvents() +208
MDetect4Umb.MDetect4UmbType.FireEvents(Object sender, EventArgs e) +51
PageEvent.umbracoPage_Load(Object sender, EventArgs e) +467
umbraco.presentation.masterpages.MasterPageLoadHandler.Invoke(Object sender, EventArgs e) +0
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Any idea why this is happening and how I can either find a work-around or fix this?
Can't access Request class from within Events extender
Hi all,
I followed the tutorial here and successfully created a .cs extension to umbraco that allowed me to hook into the backend pageload event.
I need to access the Request.ServerVariables object but when I try to I get the following exception:
Server Error in '/' Application.
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Any idea why this is happening and how I can either find a work-around or fix this?
Thanks!
Max.
Hi all,
I have the same problem. Has anyone found a solution for this?
Best, Sören
is working on a reply...