A potentially dangerous Request. Path value was detected from the client exception solution, potentially
Scenario:
When the URL contains A special character "<,>, *, %, &,:,/", the page throws A potentially dangerous Request. Path value was detected from the client exception.
Cause:
It is the default Interception Mechanism of ASP. NET to ensure the security of page URL transmission.
There are two solutions:
First, remove dangerous character verification for page requests directly:
Add the following code to the <system. web> node of the web. config configuration file:
1 <system.web>2
Second, set which dangerous characters need to be verified:
1 <system.web>2
Note that the requestPathInvalidCharacters is a list of invalid characters separated by commas. If this key-Value Pair does not exist by default, it means that the restricted invalid character set (separated by commas) is the seven: <,>, *, % ,&,:,/
If you want these characters to be unrestricted, set requestPathInvalidCharacters = "";
If you want to restrict some characters, you need to set the characters to be restricted in requestPathInvalidCharacters. For example, requestPathInvalidCharacters = "<,> ".