错误解决:[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即可。

目录
相关文章
|
缓存 PHP
Composer 报错 Error while processing content unencoding: Unknown failure within ...
Composer 报错 Error while processing content unencoding: Unknown failure within ...
207 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.
1086 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.
|
3月前
|
Java Spring
成功解决Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings
这篇文章提供了解决Spring Initializr网站初始化失败问题的方法,包括检查URL、网络和代理设置。
成功解决Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings
|
3月前
|
前端开发
Request method ‘POST‘ not supported。 Failed to load resource: net::ERR_FAILED
这篇文章讲述了在前后端分离的项目中,由于前端错误地使用了GET请求方法而不是支持的POST,导致请求被后端拒绝的问题,并提供了相应的解决方法和HTTP方法的CRUD映射知识。
Request method ‘POST‘ not supported。 Failed to load resource: net::ERR_FAILED
|
5月前
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
svn: E175002: Commit failed (details follow): svn: E175002: Unexpected HTTP status 502Bad Gateway on
134 1
|
6月前
|
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.
965 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解决办法
3479 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的依赖,就给我报这个错误。
|
应用服务中间件
tomcat Note: further occurrences of HTTP header parsing errors will be logged at DEBUG
tomcat Note: further occurrences of HTTP header parsing errors will be logged at DEBUG
1229 0
|
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等字符串时,系统会认为是危险性值。
1147 0
下一篇
无影云桌面