从客户端检测到一个潜在危险的Request.Path值(>) [英] A potentially dangerous Request.Path value was detected from the client (>)
本文介绍了从客户端检测到一个潜在危险的Request.Path值(>)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的项目正在Mvc3中开发.这个问题在很多场合都被问到了,关于这个问题的博客也很多.但是我找不到令人满意的解决方案,但仍然出现错误从客户端(>)检测到潜在的危险Request.Path值".在我的托管解决方案上.
My project is being developed in Mvc3. This questions is asked on numerous occassions and many blogs are also there for this issue. But I couldnt find satisfying solution and still giving me error "A potentially dangerous Request.Path value was detected from the client (>)." on my hosted solution.
我的web.config文件
My web.config file
<httpRuntime requestValidationMode="2.0"/>
<pages validateRequest="false">
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
<add namespace="Telerik.Web.Mvc.UI" />
</namespaces>
</pages>
我也说过ValidateInput [(False)]采取相应措施
I have also stated ValidateInput[(False)] to corrosponding action
[ValidateInput(false)]
public ActionResult Category(int storeid, string storename,int categoryId)
{
}
推荐答案
从客户(>)
由于安全问题而出现的错误,只需将其写在配置文件中即可:
error you are getting because of security issues just write this in config file:
<system.web>
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
<pages validateRequest="false" />
</system.web>
这篇关于从客户端检测到一个潜在危险的Request.Path值(>)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文