A potentially dangerous Request.Form value was detected from the client (edit)
- XSS (Cross-site scripting)
- [AllowHtml]
- [ValidateInput(false)]
- requestValidationMode & validateRequest
Problem:
https://docs.microsoft.com/en-us/aspnet/whitepapers/request-validation
Solution:
https://www.ryadel.com/en/potentially-dangerous-request-form-value-detected-client-fix/
https://qawithexperts.com/questions/303/a-potentially-dangerous-requestform-value-was-detected-from
Controller:
- [AllowHtml]
- [ValidateInput(false)]
Web.config:
<configuration>
<system.web>
<httpRuntime requestValidationMode="2.0" />
<pages validateRequest="false" />
</system.web>
</configuration>
<httpRuntime requestValidationMode="2.0"/> <configuration> <system.web> <pages validateRequest="false" /> </system.web> </configuration>