Copied to clipboard

Flag this post as spam?

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


  • Michael Lawrence 128 posts 200 karma points
    Dec 23, 2010 @ 22:39
    Michael Lawrence
    0

    Getting error when trying to save or publish in 4.5.2 (A potentially dangerous Request.Form value was detected from the client).

    I'm getting an error when I try to save or save and publish a document on a 4.5.2 site. I'm not sure what this is occurring. There is a rich text editor control on the node and it doesn't seem to like it. This is the error and stack trace I'm getting:

    A potentially dangerous Request.Form value was detected from the client (ctl00$body$content="<p>It's not often a ...").

    Stack Trace: 

    [HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (ctl00$body$content="<p>It's not often a ...").]

       System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +8734868

       System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) +122

       System.Web.HttpRequest.get_Form() +114

       System.Web.HttpRequest.get_HasForm() +8900239

       System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +97

       System.Web.UI.Page.DeterminePostBackMode() +69

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431

       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253

       System.Web.UI.Page.ProcessRequest() +78

       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21

       System.Web.UI.Page.ProcessRequest(HttpContext context) +49

       ASP.umbraco_editcontent_aspx.ProcessRequest(HttpContext context) +4

       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100

       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1              

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2010 @ 23:13
    Jan Skovgaard
    0

    Hi Michael

    Do you get this when you're saving content within the umbraco backend? Or do you create the content using a form in a user control using the umbraco API?

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2010 @ 23:18
    Jan Skovgaard
    0

    Hmmm it seems like this has been a bug in the initial release of Umbraco 4 - Here's the work item on codeplex: http://umbraco.codeplex.com/workitem/21491?ProjectName=umbraco

    But I have not heard of this happening in v4.5 before...is it an upgrade from v4.x.x to 4.5.2 you're using? Maybe that can explain it? There should be some solutions you can try out in the posted link.

    /Jan

  • Michael Lawrence 128 posts 200 karma points
    Dec 23, 2010 @ 23:25
    Michael Lawrence
    0

    It's on the backend, when trying to "Save" or "Save and Publish". I've read this and the offending page seems to be "/umbraco/editContent.aspx", but that page already has ValidateRequest="false" set in the <%@ Page %> section by default. It was an upgrade from 4.5.1 to 4.5.2. Again, I'm not sure what is going on :-/

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2010 @ 23:33
    Jan Skovgaard
    0

    Hmmm

    Do you know if you're using the ASP.NET 3.5 or ASP.NET 4?

    /Jan

  • Michael Lawrence 128 posts 200 karma points
    Dec 23, 2010 @ 23:35
    Michael Lawrence
    0

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2010 @ 23:42
    Jan Skovgaard
    0

    Ok then...

    I must admit that I'm also a bit lost here...

    But hey...let's take a long shot...

    What permissions have you given network service and the iusr? And is the app pool running in integrated mode?

    /Jan

  • Michael Lawrence 128 posts 200 karma points
    Dec 23, 2010 @ 23:44
    Michael Lawrence
    0

    This is running on a shared host (SoftSys Hosting) in full trust mode, so I don't have control over the permissions of the network service or the iusr account. It's not running in integrated mode.

    Thanks :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2010 @ 23:45
    Jan Skovgaard
    0

    Ah ok...well have you tried to contact support about it then?

    Is it possible for you to try and set it to run integrated mode to see what happens? Or do you need to ask supprt to do that?

    /Jan

  • Michael Lawrence 128 posts 200 karma points
    Dec 23, 2010 @ 23:52
    Michael Lawrence
    0

    I can set it to integrated, but then I get a whole new set of issues. Some of the CSS files on the backend don't load and things just look crazy and unstyled. Previously I had issues running in integrated mode on this host and they told me the web.config was not configured correctly to support integrated mode. I didn't know that there was a need to change the web.config to specifically support integrated mode. 

    I haven't contacted support about this yet because it seemed more like an Umbraco specific related bug to me, but then again I may be wrong, hehe.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 23, 2010 @ 23:54
    Jan Skovgaard
    0

    Hi Michael

    Ok, then you should probably not set it to integrated mode afterall.

    I must admit this is the first time I hear about the issue on a 4.5.2 installation so I suspect it can maybe the hosting setup somehow...but I'm not certain.

    Maybe some of the gurus in here have some greater pointers and advice than me. I hope you get this annoying problem solved :-)

    /Jan

  • Michael Lawrence 128 posts 200 karma points
    Dec 23, 2010 @ 23:56
    Michael Lawrence
    0

    Well, I have a ton of Umbraco sites running on the same host and have yet to experience the same issue I am here, which is why I think it probably isn't the host. To be honest, I'm at a loss here. :-/ Thanks for your help though :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 26, 2010 @ 11:45
    Jan Skovgaard
    0

    Hi again Michael

    After reading the reply of Bas in the post below I think that you should get clarified if there is any differences in the permission settings etc. on this particular site and the others you have on the same host that is running without any problems. According to Bas there were some trouble with the permissions setting and IIS.

    http://our.umbraco.org/forum/using/ui-questions/15846-SystemWebHttpRequestValidationException-after-publishing-a-page?p=0#comment58525

    /Jan

  • Michael Lawrence 128 posts 200 karma points
    Dec 27, 2010 @ 08:13
    Michael Lawrence
    0

    Hmm, that doesn't seem to help me. I don't have control over the permissions of the site (other than to enable Write Permissions, which are enabled). It's also set to the correct version (4.0). I'll have to contact their tech support and see if they have any clue as to what is going on.

    Thanks!

  • Michael Lawrence 128 posts 200 karma points
    Dec 29, 2010 @ 22:30
    Michael Lawrence
    0

    I've contacted tech support at my host and they seem to think it's not the server. Anyone else have any ideas of what it could possibly be?

    Thanks!

  • Michael Lawrence 128 posts 200 karma points
    Jan 04, 2011 @ 20:48
    Michael Lawrence
    0

    I'm pulling my hair out here. I can't seem to figure out why this error is still showing up. Anyone have any more ideas?

  • Michael Lawrence 128 posts 200 karma points
    Jan 08, 2011 @ 02:01
    Michael Lawrence
    1

    I figured it out. My web.config file was missing the requestValidationMode="2.0" from the httpruntime node. Adding that fixed it! :)

  • Martin van de Hoef 5 posts 26 karma points
    Mar 22, 2011 @ 10:17
    Martin van de Hoef
    0

    Thanks for posting your solution Michael! This line of code in the web.config helped me out as well.

    I ran into the same problem when upgrading from umbraco 4.5.2 to 4.7 and from .NET 3.5 to .NET 4.0.

  • Rob Watkins 369 posts 701 karma points
    May 23, 2012 @ 16:46
    Rob Watkins
    0

    Just in case anyone else is getting this, there is one other thing to be aware of - umbraco/members/EditMember.aspx does NOT have ValidateRequest="false" set on it, so if you are using the Umbraco Member Provider to set up rich content on your members, you may well run into this.

    Just add ValidateRequest="false" to the @Page tag of umbraco/members/EditMember.aspx.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jun 27, 2012 @ 15:43
    Alex Skrypnyk
    100

    try add 

    <httpRuntimerequestValidationMode="2.0"/>
Please Sign in or register to post replies

Write your reply to:

Draft