[ValidateInput(false)]
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" requestValidationMode="2.0"/>
ValidateInput, requestValidationMode, webConfig, controller, csharp
在ASP.NET中,通过在Controller上添加[ValidateInput(false)]和在web.config中设置requestValidationMode为2.0,可以禁用输入验证以允许特殊字符。