-1

I am getting following exception on appending dodgy value in Api url.

I've tried a lot of different suggestions from other stack overflow questions, like 1 and 2. However, adding this to my Web.config doesn't work:

Here is error stack trace details:

[HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (<).] System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +678 System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +52

1 Answers1

-1

There is a solution in one of the stack overflow link. It might help to resolve your issue.

or you can simply update your web.config's system.web attribute as below

<system.web>
    <httpRuntime requestPathInvalidCharacters="<,>" requestValidationMode="2.0" />
    <pages validateRequest="false" />
</system.web>

or if you use .NET 4.0 then simple put

<system.web>
    <httpRuntime requestValidationMode="2.0" />
</system.web>
  • Thanks for suggestion but i already tried above solutions. It won't fix things for me. Here is Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3282.0 – Kunal Chhabra Jan 13 '20 at 16:51