从客户端检测到一个潜在危险的Request.Path值(>)

编程入门 行业动态 更新时间:2024-10-26 08:23:46
本文介绍了从客户端检测到一个潜在危险的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值(>)

本文发布于:2023-11-12 05:11:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580599.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:检测到   客户端   危险   gt   Path

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!