Copied to clipboard

Flag this post as spam?

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


  • Mahmood 28 posts 48 karma points
    May 18, 2011 @ 08:20
    Mahmood
    0

    A potentially dangerous Request.Form value was detected from the client

    hi all, i have deployed umbraco application on client server... now when i try to modified any content then i got following error:

    A potentially dangerous Request.Form value was detected from the client

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    May 18, 2011 @ 09:53
    Michael Latouche
    0

    Hi Mahmood,

    This is probably because you try to include characters that are seen as "dangerous" by the server, like ">", or "<" or "<script>" etc. In order to avoid the error, you have to set the ValidateRequest property to false. This can be done either at page level or at web.config level.

    Page level:

    <%@ Page validateRequest="false" %>

    Web.config level:

    <configuration>
        <system.web>
            <pages validateRequest="false" />
        </system.web>
    </configuration>

    Attention: in that case, you should always render the HTML using HtmlEncode to avoid potential security risks if someone would actually post "malicious" html back to the server.

    More info can be found here: http://www.asp.net/learn/whitepapers/request-validation

    Hope this helps.

    Cheers,

    Michael.

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    Jun 27, 2012 @ 15:47
    Alex Skrypnyk
    100

    Also add 

    <httpRuntime requestValidationMode="2.0" />

    to your web config

Please Sign in or register to post replies

Write your reply to:

Draft