validateRequest problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mar

    #1

    validateRequest problems

    Does anybody know what configuration section should i set
    to false here. I also tried setting the page directive
    to false but that didn't fix it.
    Thanks!
    mc


    A potentially dangerous Request.Form value was detected
    from the client (ResultInput=". ..="1.0"?> <ResultData
    xmlns:xs...").
    Description: Request Validation has detected a
    potentially dangerous client input value, and processing
    of the request has been aborted. This value may indicate
    an attempt to compromise the security of your
    application, such as a cross-site scripting attack. You
    can disable request validation by setting
    validateRequest =false in the Page directive or in the
    configuration section. However, it is strongly
    recommended that your application explicitly check all
    inputs in this case.

    Exception Details:
    System.Web.Http RequestValidati onException: A potentially
    dangerous Request.Form value was detected from the client
    (ResultInput=". ..="1.0"?> <ResultData xmlns:xs...").

    Source Error:

    An unhandled exception was generated during the execution
    of the current web request. Information regarding the
    origin and location of the exception can be identified
    using the exception stack trace below.

    Stack Trace:


    [HttpRequestVali dationException (0x80004005): A
    potentially dangerous Request.Form value was detected
    from the client (ResultInput=". ..="1.0"?>
    <ResultData xmlns:xs...").]
    System.Web.Http Request.Validat eString(String s, String
    valueName, String collectionName) +230
    System.Web.Http Request.Validat eNameValueColle ction
    (NameValueColle ction nvc, String collectionName) +99
    System.Web.Http Request.get_For m() +121
    System.Web.UI.P age.GetCollecti onBasedOnMethod () +70
    System.Web.UI.P age.DeterminePo stBackMode() +47
    System.Web.UI.P age.ProcessRequ estMain() +2106
    System.Web.UI.P age.ProcessRequ est() +218
    System.Web.UI.P age.ProcessRequ est(HttpContext context)
    +18

    System.Web.Call HandlerExecutio nStep.System.We b.HttpApplica
    tion+IExecution Step.Execute() +179
    System.Web.Http Application.Exe cuteStep(IExecu tionStep
    step, Boolean& completedSynchr onously) +87




    ----------------------------------------------------------
    ----------------------
    Version Information: Microsoft .NET Framework
    Version:1.1.432 2.573; ASP.NET Version:1.1.432 2.573
  • Wim Hollebrandse

    #2
    Re: validateRequest problems

    Add validateRequest ="false" to your Page directive, eg.:

    <%@ Page validateRequest ="false" %>

    Alternatively - if you want to disable request validation for your whole web
    app you can add the following to the system.web section of your web.config:

    <pages validateRequest ="false" />

    Hope that helps,
    Wim Hollebrandse
    Zealand IT Ltd is a UK based IT consultancy and software development company that specialises in bespoke Microsoft .NET solutions including ASP.NET web applications and advanced SOA architectures for public and private sector clients. Please contact us for a free quote.




    "mar" <mar10c@cox.net > wrote in message
    news:062501c344 cb$5a6c1b30$a10 1280a@phx.gbl.. .[color=blue]
    > Does anybody know what configuration section should i set
    > to false here. I also tried setting the page directive
    > to false but that didn't fix it.
    > Thanks!
    > mc
    >
    >
    > A potentially dangerous Request.Form value was detected
    > from the client (ResultInput=". ..="1.0"?> <ResultData
    > xmlns:xs...").
    > Description: Request Validation has detected a
    > potentially dangerous client input value, and processing
    > of the request has been aborted. This value may indicate
    > an attempt to compromise the security of your
    > application, such as a cross-site scripting attack. You
    > can disable request validation by setting
    > validateRequest =false in the Page directive or in the
    > configuration section. However, it is strongly
    > recommended that your application explicitly check all
    > inputs in this case.
    >
    > Exception Details:
    > System.Web.Http RequestValidati onException: A potentially
    > dangerous Request.Form value was detected from the client
    > (ResultInput=". ..="1.0"?> <ResultData xmlns:xs...").
    >
    > Source Error:
    >
    > An unhandled exception was generated during the execution
    > of the current web request. Information regarding the
    > origin and location of the exception can be identified
    > using the exception stack trace below.
    >
    > Stack Trace:
    >
    >
    > [HttpRequestVali dationException (0x80004005): A
    > potentially dangerous Request.Form value was detected
    > from the client (ResultInput=". ..="1.0"?>
    > <ResultData xmlns:xs...").]
    > System.Web.Http Request.Validat eString(String s, String
    > valueName, String collectionName) +230
    > System.Web.Http Request.Validat eNameValueColle ction
    > (NameValueColle ction nvc, String collectionName) +99
    > System.Web.Http Request.get_For m() +121
    > System.Web.UI.P age.GetCollecti onBasedOnMethod () +70
    > System.Web.UI.P age.DeterminePo stBackMode() +47
    > System.Web.UI.P age.ProcessRequ estMain() +2106
    > System.Web.UI.P age.ProcessRequ est() +218
    > System.Web.UI.P age.ProcessRequ est(HttpContext context)
    > +18
    >
    > System.Web.Call HandlerExecutio nStep.System.We b.HttpApplica
    > tion+IExecution Step.Execute() +179
    > System.Web.Http Application.Exe cuteStep(IExecu tionStep
    > step, Boolean& completedSynchr onously) +87
    >
    >
    >
    >
    > ----------------------------------------------------------
    > ----------------------
    > Version Information: Microsoft .NET Framework
    > Version:1.1.432 2.573; ASP.NET Version:1.1.432 2.573[/color]


    Comment

    Working...