添加类
public class RequestValidatorDisabled:RequestValidator
{
protected override bool IsValidRequestString(HttpContext context, string value, RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex)
{
validationFailureIndex = -1;
return true;
}
public RequestValidatorDisabled()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
}
配置web.config
<system.web>
<httpRuntime requestValidationType="RequestValidatorDisabled"/>
<system.web>