CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • A potentially dangerous Request.Form value was detected from the client

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    7297
  • Date Created
    Saturday, May 2, 2026
  • This Article Has been Viewed
    0 times
  • Short Desc

    Receiving Web.Config error message stating to add debugging, even though my page already has it set.
  • Article Details

     
    Server Error in '/' Application.
    A potentially dangerous Request.Form value was detected from the client (myTextarea="...ORE-02 Up!<br />With domain: c...").


    The Problem: Strict Infrastructure Validation

    In earlier versions of ASP.NET (2.0 through 3.5), Request Validation only occurred when a specific .aspx page was being processed. This allowed the directive <%@ Page ValidateRequest="false" %> to work effectively because the validation happened late enough in the lifecycle for the page to say "I've got this".

    Starting with ASP.NET 4.0, the validation was moved much earlier in the HTTP request lifecycle (before the BeginRequest phase). It now applies to all requests, including Web Services and custom handlers, not just .aspx pages. Because it triggers so early, the framework rejects "dangerous" content (like HTML tags in your textarea) before it even reads the page's directive to disable validation
  • Recreate Issue

    Web.Config does not have the required httpRuntime property to handle the request.
  • Resolve Issue

    Add the following to your Web.Config file.

    <httpRuntime requestValidationMode="2.0"/>
    If you already have this in your file, simply add the requestValidationMode="2.0"
    To the list of httpRuntime elements in the list.