A potentially dangerous Request.Form value was detected from the client

个是ASP.NET页面为了防范页面注入功能的一种保护机制,要取消这种保护,常规的做法是在.aspx文件的<%@Page %>部分加入ValidateRequest="false"属性。但是从.NET 4.0开始你可能需要多修改一个地方,在网站的web.config文件中加入这行配置:

   

<system.web>
<httpRuntime requestValidationMode="2.0"/>
<pages validateRequest="false" clientIDMode="AutoID"/>
</system.web>
原文地址:https://www.cnblogs.com/383855647chenyu/p/3637610.html