The current httpContext can only be set once during a request.
Everytime my website is restart, i get the above error on the first request.
Running version 6.0.3
Stacktrace: [ApplicationException: The current httpContext can only be set once during a request.] Umbraco.Web.UmbracoContext.set_Current(UmbracoContext value) +155 Umbraco.Web.UmbracoContext.EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, Boolean replaceContext) +332 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +182 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +256
I'm not sure why this is suddenly and issue, but I can reproduce this when using the UltraDev web server in VS. I highly recommend switching to the IISExpress server instead. Will investigate what the problem is with ultradev but it's pretty outdated by now and we've been running all our development on IISExpress for over a year now with great success.
I am using VS2010 and get this after a clean Umbraco install using nuGet.This happens for v6.0.3.
This is a serious problem and does anyone have a resolution?? Please!
My errors are:
The current httpContext can only be set once during a request.
[ApplicationException: The current httpContext can only be set once during a request.]
Umbraco.Web.UmbracoContext.set_Current(UmbracoContext value) +149
Umbraco.Web.UmbracoContext.EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, Boolean replaceContext) +371
Umbraco.Web.UmbracoModule.BeginRequest(HttpContextBase httpContext) +226
Umbraco.Web.UmbracoModule.<Init>b__6(Object sender, EventArgs e) +124
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
I ask because the task is prioritised as minor, presumably because of the assumption it is only happening on development web servers; as it happens on production versions of IIS6 I'd suggest it's a bit more important than that - and if it was possible for it to occur on IIS7 it would be obviously a lot more serious as many sites will be using that in production!
Had not realized it had to occur on IIS6 too... I think only IIS7 w/integrated pipeline is safe. That being said, we have a fix for 6.1 and will have one for 6.0 and 4.11 soon. Stay tuned.
Just as an update for anyone who has this problem, there's an updated umbraco.dll available until the next release is out: http://issues.umbraco.org/issue/U4-2030
Just tried this update, but still get the same error? I'm using VS2010 and created a new site with nuget. Then added the updated umbraco.dll to the bin folder, but still get the same error when running the site for the first time.
For anyone still having the error: can you post the _exact_ exception message that you get? It should at least have changed... so I'm wondering how you can see the _same_ error.
And in addition to that: what server is running umbraco, did you have the problem before 6.0.3 as well (it could be a problem that's always existed) and are you sure that you unblocked the zip file and copied umbraco.dll from the zip file into the /bin folder of the website that you're trying to run?
NOTE: Important: If you do use NuGet, it will copy the OLD umbraco.dll into the bin folder on every build. Please go into your packages\UmbracoCms.Core.6.0.3\lib\ folder and copy the umbraco.dll there too!
I was getting the 500 error on first load of my site as well. The site worked fine after refresh I had no problems with umbraco. I have 4.11.6. I updated the dll with the fix from http://issues.umbraco.org/issue/U4-2030 and I haven't had the problem since.
Working with Umbraco 6.0.3 (Mvc setting) and IIS 6. After copying the fixed .dll to the bin folder the "The current httpContext can only be set once during a request." error was gone. Thx.
The current httpContext can only be set once during a request.
Everytime my website is restart, i get the above error on the first request.
Running version 6.0.3
Stacktrace:
[ApplicationException: The current httpContext can only be set once during a request.] Umbraco.Web.UmbracoContext.set_Current(UmbracoContext value) +155 Umbraco.Web.UmbracoContext.EnsureContext(HttpContextBase httpContext, ApplicationContext applicationContext, Boolean replaceContext) +332 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +182 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +256
I've got the samen problem, only difference is I'm using 4.11.6.
Didn't have the problem with 4.11.5
Have you got the code you are trying to use? to make the request? Charlie :)
This guy is alos having the same problem :) http://our.umbraco.org/forum/using/ui-questions/39653-Trouble-importing-images
This happens on a 100% clean 6.0.3 installation.
I am running it through the UltaDev web server, but it also happens on IIS on my custom site
I had the problem running from within VS, but the site works fine when run on IIS (Umbraco 6.0.3)
I also have this problem. I created an empty web project in VS. Used nuget to install umbraco and hit F5. Then i got
The current httpContext can only be set once during a request.
Can't complete the install after that. Didn't had this problem with 6.0.2
Someone found a solution for it?
Same Issue here. Both 4.11.6 and 6.0.3 throwing the same exception.
I'm not sure why this is suddenly and issue, but I can reproduce this when using the UltraDev web server in VS. I highly recommend switching to the IISExpress server instead. Will investigate what the problem is with ultradev but it's pretty outdated by now and we've been running all our development on IISExpress for over a year now with great success.
I see it is working in IISExpress, however i also get the error in the VS Development Server
br
Michael
I'm using IISExpress with Visual Studio 2012 and am still getting the error.
I am still getting this error.
I am using VS2010 and get this after a clean Umbraco install using nuGet.This happens for v6.0.3.
This is a serious problem and does anyone have a resolution?? Please!
My errors are:
The current httpContext can only be set once during a request.
Got the same issues with VS2010, Windows 7 and a clean Umbraco v6.0.3 install using nuGet. I don't have this problem with VS2012 and Windows 8
Hi Guys,
I was having this issue with 6.0.3 as well. I am using IIS 7 and visiual studio 2010.
I resloved the issue by switching the Managed Pipeline Mode from classic to integrated.
Hope this helps
Kris
see the following link: http://issues.umbraco.org/issue/U4-1270. I have used it during the process of updating 4.5.2 to 4.11.6.
Step 1: The solution is to do the following in the web.config
<httpModules>
<!-- URL REWRTIER -->
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
<!-- UMBRACO -->
<!--<add name=" UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />-->
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
<!-- ASPNETAJAX -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<!-- CLIENT DEPENDENCY -->
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
</httpModules>
Step 2: I have gone through the process of updating the website to the newer version (4.11.6).
Step 3: I have done the following:
Hope that help.
Cause of the issue has been identified. Working on a fix.
I'm stopped by this one as well.
Glad to know that Stephen has found the cause. Thanks Stephen!
Do you think this will be a patch release or a workaround that get's posted here?
Appreciatively,
JT
This does seem to be a common problem. And hopefully a fix is coming soon... Please
At least development can continue as the CMS works fine after the initial request and error.
I have also found it works fine through VS2010 if you startup through IIS instead of the native VS server.
But please UMBRACO team: give us a fix!! ;-)
I have the same problem on the latest Umbraco version (6.0.3).
This is issue http://issues.umbraco.org/issue/U4-2054
Just FYI, I'm experiencing this issue on version 4.11.6.
IIS 6.0
Windows Server 2003 SP2
Stephen: It's not just Cassini / IIS Express / development servers - as Stepahnie says it happens on IIS 6 too.
Can this theoretically happen on IIS7, or is it impossible on that version?
I ask because the task is prioritised as minor, presumably because of the assumption it is only happening on development web servers; as it happens on production versions of IIS6 I'd suggest it's a bit more important than that - and if it was possible for it to occur on IIS7 it would be obviously a lot more serious as many sites will be using that in production!
Had not realized it had to occur on IIS6 too... I think only IIS7 w/integrated pipeline is safe. That being said, we have a fix for 6.1 and will have one for 6.0 and 4.11 soon. Stay tuned.
Just as an update for anyone who has this problem, there's an updated umbraco.dll available until the next release is out: http://issues.umbraco.org/issue/U4-2030
Just tried this update, but still get the same error? I'm using VS2010 and created a new site with nuget. Then added the updated umbraco.dll to the bin folder, but still get the same error when running the site for the first time.
I just did the exact same as Robert. I get the same error with the new DLL. I'm using 6.0.3 and used the new 6.0.3 DLL.
Any progress?
For anyone still having the error: can you post the _exact_ exception message that you get? It should at least have changed... so I'm wondering how you can see the _same_ error.
And in addition to that: what server is running umbraco, did you have the problem before 6.0.3 as well (it could be a problem that's always existed) and are you sure that you unblocked the zip file and copied umbraco.dll from the zip file into the /bin folder of the website that you're trying to run?
NOTE: Important: If you do use NuGet, it will copy the OLD umbraco.dll into the bin folder on every build. Please go into your packages\UmbracoCms.Core.6.0.3\lib\ folder and copy the umbraco.dll there too!
Thanks Sebastiaan.You have been a star. My instance is fixed when i copy the DLL into the nuGet packages folder as described above.
;)
Nice work Sebastiaan! Upgrade to 4.11.6 did work after copying the new umbraco.dll. Thanks.
I was getting the 500 error on first load of my site as well. The site worked fine after refresh I had no problems with umbraco. I have 4.11.6. I updated the dll with the fix from http://issues.umbraco.org/issue/U4-2030 and I haven't had the problem since.
Good post. Thanks for the helful replies.
Working with Umbraco 6.0.3 (Mvc setting) and IIS 6. After copying the fixed .dll to the bin folder the "The current httpContext can only be set once during a request." error was gone. Thx.
Resolved after installing the upgrade. Thank you!
is working on a reply...