Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Falk 37 posts 59 karma points
    Mar 29, 2013 @ 07:40
    Michael Falk
    0

    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

  • Remko 118 posts 283 karma points
    Mar 29, 2013 @ 16:21
    Remko
    0

    I've got the samen problem, only difference is I'm using 4.11.6.

    Didn't have the problem with 4.11.5

  • Charles Afford 1163 posts 1709 karma points
    Mar 30, 2013 @ 09:36
    Charles Afford
    0

    Have you got the code you are trying to use? to make the request?  Charlie :)

  • Charles Afford 1163 posts 1709 karma points
    Mar 30, 2013 @ 09:38
  • Michael Falk 37 posts 59 karma points
    Mar 30, 2013 @ 09:39
    Michael Falk
    0

    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

  • vijaya raghavan 3 posts 23 karma points
    Mar 30, 2013 @ 12:10
    vijaya raghavan
    0

    I had the problem running from within VS, but the site works fine when run on IIS (Umbraco 6.0.3)

  • Marthijn Wassink 17 posts 50 karma points
    Mar 30, 2013 @ 21:53
    Marthijn Wassink
    0

    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?

  • Keith Beller 4 posts 24 karma points
    Mar 31, 2013 @ 16:18
    Keith Beller
    0

    Same Issue here.  Both 4.11.6 and 6.0.3 throwing the same exception.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Mar 31, 2013 @ 18:50
    Sebastiaan Janssen
    0

    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.

  • Michael Falk 37 posts 59 karma points
    Mar 31, 2013 @ 20:07
    Michael Falk
    0

    I see it is working in IISExpress, however i also get the error in the VS Development Server

     

    br
    Michael

     

  • Keith Beller 4 posts 24 karma points
    Mar 31, 2013 @ 21:39
    Keith Beller
    0

    I'm using IISExpress with Visual Studio 2012 and am still getting the error.

  • Jerry 4 posts 24 karma points
    Apr 02, 2013 @ 00:17
    Jerry
    0

    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.

    [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

  • Marthijn Wassink 17 posts 50 karma points
    Apr 02, 2013 @ 10:32
    Marthijn Wassink
    0

    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

  • kris 13 posts 54 karma points
    Apr 02, 2013 @ 11:37
    kris
    0

    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

  • Al Khalil 1 post 22 karma points
    Apr 02, 2013 @ 13:15
    Al Khalil
    1

    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

    1. Copy the httpModules tag and keep it handy for later use.
    2. Add <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
    3. Add <add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
    4. Comment out <!--<add name=" UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />-->

      
        <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:

    1. I have reverted back the web.config as it was before (retore httpModules from the copy you have done in step 1 - point 1).
    2. Logged into Umbraco and published the website again
    3. it has worked.

    Hope that help.

  • Stephen 767 posts 2273 karma points c-trib
    Apr 02, 2013 @ 14:28
    Stephen
    0

    Cause of the issue has been identified. Working on a fix.

  • John 1 post 21 karma points
    Apr 03, 2013 @ 22:49
    John
    0

    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 

  • Jerry 4 posts 24 karma points
    Apr 04, 2013 @ 00:49
    Jerry
    0

    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!! ;-)

  • Benjamin Ravn 35 posts 68 karma points
    Apr 04, 2013 @ 16:53
    Benjamin Ravn
    0

    I have the same problem on the latest Umbraco version (6.0.3).

  • Stephen 767 posts 2273 karma points c-trib
    Apr 05, 2013 @ 12:22
  • Stephanie 39 posts 101 karma points
    Apr 05, 2013 @ 15:36
    Stephanie
    0

    Just FYI, I'm experiencing this issue on version 4.11.6.

    IIS 6.0

    Windows Server 2003 SP2

  • Rob Watkins 369 posts 701 karma points
    Apr 05, 2013 @ 16:51
    Rob Watkins
    0

    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?

  • Rob Watkins 369 posts 701 karma points
    Apr 05, 2013 @ 16:57
    Rob Watkins
    0

    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!

  • Stephen 767 posts 2273 karma points c-trib
    Apr 05, 2013 @ 18:24
    Stephen
    0

    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.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Apr 10, 2013 @ 13:29
    Sebastiaan Janssen
    0

    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

  • Robert Lewis 29 posts 94 karma points
    Apr 11, 2013 @ 02:02
    Robert Lewis
    0

    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.

  • Jerry 4 posts 24 karma points
    Apr 11, 2013 @ 06:14
    Jerry
    0

    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?

  • Stephen 767 posts 2273 karma points c-trib
    Apr 11, 2013 @ 09:29
    Stephen
    0

    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.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Apr 11, 2013 @ 09:49
    Sebastiaan Janssen
    0

    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!

  • Jerry 4 posts 24 karma points
    Apr 12, 2013 @ 01:18
    Jerry
    0

    Thanks Sebastiaan.You have been a star. My instance is fixed when i copy the DLL into the nuGet packages folder as described above.

    ;)

  • Arjan Woldring 124 posts 231 karma points
    Apr 22, 2013 @ 12:32
    Arjan Woldring
    0

    Nice work Sebastiaan! Upgrade to 4.11.6 did work after copying the new umbraco.dll. Thanks.

  • Blake Watt (Clerke) 106 posts 351 karma points MVP 2x
    Apr 23, 2013 @ 02:00
    Blake Watt (Clerke)
    0

    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.

  • Michiel 30 posts 61 karma points
    Apr 26, 2013 @ 11:52
    Michiel
    0

    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.

  • nickornotto 402 posts 905 karma points
    May 20, 2013 @ 12:21
    nickornotto
    0

    Resolved after installing the upgrade. Thank you!

Please Sign in or register to post replies

Write your reply to:

Draft