错误解决:[A potentially dangerous Request.Form value was detected from the client]

简介:
错误提示:
从客户端(TextBox1="<!DOCTYPE HTMLPUBLI...")中检测到有潜在危险的 Request.Form 值。
A potentially dangerous Request.Form value was detected from theclient (txtTest="<b>").
由于在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危险性值。立马报错。
解决方案一:
在.aspx文件头中加入这句:
<%@ Page validateRequest="false" 
%>

解决方案二:
修改web.config文件:
<configuration>
  <system.web>
   <pages validateRequest="false"/>
 </system.web>
</configuration>
因为validateRequest默认值为true。只要设为false即可。

目录
相关文章
|
8月前
|
缓存 PHP
Composer 报错 Error while processing content unencoding: Unknown failure within ...
Composer 报错 Error while processing content unencoding: Unknown failure within ...
129 0
|
Java
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
888 0
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
|
8月前
|
KVM 虚拟化
成功解决Problem while trying to mount target]\“. HTTP response code is 400
成功解决Problem while trying to mount target]\“. HTTP response code is 400
|
Java 应用服务中间件 Linux
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
1268 0
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
|
应用服务中间件 API nginx
解决跨域问题 Response to preflight request doesn't pass access control check
解决跨域问题 Response to preflight request doesn't pass access control check
8804 0
|
Java Spring
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
1952 1
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
|
Java Android开发
Bad method handle type 7异常解决
在利用androidx版本写demo时,在添加了一些依赖后,遇到了`java.lang.ClassNotFoundException`bug,这就很奇怪了,我就添加rxjava3的依赖,就给我报这个错误。
成功解决404 Not Found Not Found The requested URL was not found on the server. If yo
成功解决404 Not Found Not Found The requested URL was not found on the server. If yo
|
Web App开发 .NET
解决.Net 4.0 A potentially dangerous Request.Form value was detected from the client 异常
解决ASP.NET 4.0   "A potentially dangerous Request.Form value was detected from the client". 错误在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危险性值。
1117 0