Potentially dangerous Request. Form value avoidance method

  • 2020-08-22 21:57:33
  • OfStack

Personal feeling in.net framework 4.0

The best solution to the problem of "potentially dangerous Request.Form values" is

Add in system.web < httpRuntime requestValidationMode="2.0"/ > This sentence

Because validation 4.0 is enabled before HTTP's BeginRequest
 
<system.web> 
<httpRuntime requestValidationMode="2.0" /> 
</system.web> 

Related articles: