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

目录
相关文章
|
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.
1149 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.
|
5月前
|
前端开发
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
|
8月前
|
IDE 开发工具 Python
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for MicrosoftEdge
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for MicrosoftEdge
634 3
|
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
1616 0
SpringBoot - Processing of multipart/form-data request failed. Unexpected EOF read on the socket
|
KVM 虚拟化
成功解决Problem while trying to mount target]\“. HTTP response code is 400
成功解决Problem while trying to mount target]\“. HTTP response code is 400
|
Web App开发 JavaScript
Chrome浏览器控制台Unchecked runtime.lastError: The message port closed before a response was received.解决
大家好,今天和大家分享一报错的解决方法 在使用vue开发时使用Chrome运行的时候出现了一个报错,当时什么都没有写就报错了,就找了一下这个问题,后来发现是因为迅雷拓展的问题,下面就一起来看看如何解决这个问题。
|
Java Android开发
Bad method handle type 7异常解决
在利用androidx版本写demo时,在添加了一些依赖后,遇到了`java.lang.ClassNotFoundException`bug,这就很奇怪了,我就添加rxjava3的依赖,就给我报这个错误。
报错解决:Reason: Failed to determine a suitable driver class
报错解决:Reason: Failed to determine a suitable driver class
2572 0
报错解决:Reason: Failed to determine a suitable driver class
关于 QNetworkManager出现“QSslSocket: cannot call unresolved function SSLv23_client_method“ 的解决方法
关于 QNetworkManager出现“QSslSocket: cannot call unresolved function SSLv23_client_method“ 的解决方法
关于 QNetworkManager出现“QSslSocket: cannot call unresolved function SSLv23_client_method“ 的解决方法
|
Web App开发
selenium.common.exceptions.WebDriverException: Message: unable to set cookie
selenium.common.exceptions.WebDriverException: Message: unable to set cookie
431 0

热门文章

最新文章