A potentially dangerous Request.Path value was detected from the client (&).

Ajay
Ajay
0 Points
0 Posts

I'm using .net 4.7. Showing errow when passing special characters in the url and getting following error:

A potentially dangerous Request.Path value was detected from the client (&).","Data":null,"InnerException":null

Is there anyway to resolve it?

Views: 117
Total Answered: 3
Total Marked As Answer: 1
Posted On: 16-Apr-2024 06:19

Share:   fb twitter linkedin
Answers
Smith
Smith
None
2568 Points
74 Posts
         

Add following in the System.Web in the web.config:

<system.web>
  <httpRuntime requestPathInvalidCharacters="" />
   -----
</system.web>

It will allow all characters in the request path.

Posted On: 16-Apr-2024 06:52
thanks.
 - Ajay  16-Apr-2024 23:14
Good catch!
 - Rashmi  17-Apr-2024 03:43
Ajay
Ajay
0 Points
0 Posts
         

Thanks. Worked as charm!

Posted On: 16-Apr-2024 23:14
Rashmi
Rashmi
Member
820 Points
17 Posts
         

I saved my time and my issue was resolved too.

Posted On: 17-Apr-2024 03:44
 Log In to Chat