Potential dangerous request path

Adeel Mirza 121 Reputation points
2022-02-14T09:01:22.39+00:00

I have a web application that uses query strings and in some cases sessions as an input.

Now there is no way I can stop a user from typing this.

https://myApplication/<><>

Whenever a user types this it shows a error message "Potentially dangerous request..path value.
How can I handle this issue?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,318 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,071 Reputation points
    2022-02-15T02:11:36.627+00:00

    Hi @Adeel Mirza ,
    The <><> character is not allowed in the path of the URL, You could try add <httpRuntime requestValidationMode="2.0" /> at system.web section.
    You could learn from this thread.
    Best regards,
    Yijing Sun


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments