教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Asp.net  >  正文 .net中A potentially dangerous Request.Form value was detected from the client解决办法

.net中A potentially dangerous Request.Form value was detected from the client解决办法

发布时间:2017-12-13   编辑:jiaochengji.com
教程集为您提供.net中A potentially dangerous Request.Form value was detected from the client解决办法等资源,欢迎您收藏本站,我们将为您提供最新的.net中A potentially dangerous Request.Form value was detected from the client解决办法资源
本文章介绍.net中A potentially dangerous Request.Form value was detected from the client解决办法,有需要的同学可参考一下。

在asp.net mvc2中使用web编辑器提交表单时,出现如下错误:

<em>A potentially dangerous Request.Form value was detected from the client</em>

potential_dangerous.png

这是由于内容中包含html标签造成的。要怎么解决这个问题呢?错误提示本身有解决方法参考链接:http://go.microsoft.com/fwlink/?LinkId=153133

按照这个链接所提示的方法,有时并不能很好的解决。更好的解决方法是:

在web.config中添加如下属性

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy8386')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy8386>

<system.web>

<code><httpRuntime requestValidationMode="2.0" /></code>

</system.web>

据说这个方法比较安全一点。

您可能感兴趣的文章:
.net中A potentially dangerous Request.Form value was detected from the client解决办法
Windowns 7穿越火线无法进入提示 Client file corruption detected
zf中Invalid command 'RewriteEngine'错误的解决办法
golang.org/x/net/trace重复错误
A Study of WebRTC Security
MySQL主从配置提示Failed to initialize the master info structure错误
jQuery模板技术和数据绑定实现代码
如何在Go中使用context上下文
The type XXX cannot be resolved. It is indirectly referenced from required .class files错误
golang 数据库连接池database/sql 实现原理分析

[关闭]
~ ~