A potentially dangerous Request.Path value was detected from the client (:) in ASP.NET 4.6

28 Views Asked by At

I'm working on ASP.NET 4.6 application. I have encountered this exception

Exception        :: System.Web.HttpException
    Message          :: A potentially dangerous Request.Path value was detected from the client (:).
    Stack Trace      :: 
       at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
       at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

I have tried the methods given in the previous questions but none worked.

My config:

    <system.web>
        <pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false" />
        <httpRuntime requestValidationMode="2.0" />
    </system.web>

Note: In Request, it allows ;(%3b) but it blocks :(%3a)

Example requests:

  • For ; - https://www.test.com/te%3b-keyword
  • For : - https://www.test.com/tes%3a-keyword

Expecting possible solutions other than the previous answers

0

There are 0 best solutions below