-2

I am using asp.net and using url rewriting

I am getting this error

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

Basically I want all the characters that cause this error to be removed.

For example, the above error generated when the character & found in url.

So there can be any number of characters (including foreign language characters).

Any help will be highly appreciated

user786
  • 3,902
  • 4
  • 40
  • 72
  • 1
    possibly duplicate of http://stackoverflow.com/questions/6025522/getting-a-potentially-dangerous-request-path-value-was-detected-from-the-client –  Oct 20 '15 at 06:01
  • or http://stackoverflow.com/questions/14475913/url-routing-image-handler-a-potentially-dangerous-request-path-value –  Oct 20 '15 at 06:02
  • or http://stackoverflow.com/questions/5967103/a-potentially-dangerous-request-path-value-was-detected-from-the-client –  Oct 20 '15 at 06:02
  • Usually this error happens when one decides to not add `?` to separate query parameters. Without sample of what you trying to achieve it is not possible to figure out if you actually found new and useful case or one of duplicates suggested by @PranavPatel should be used to close. – Alexei Levenkov Oct 20 '15 at 07:31

1 Answers1

1

Have you looked at UrlEncode?

https://msdn.microsoft.com/en-us/library/4fkewx0t(v=vs.110).aspx