为什么ValidateInput(假)不工作? [英] Why is ValidateInput(False) not working?

查看:189
本文介绍了为什么ValidateInput(假)不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我转换我使用的WebForms使用vb.net的asp.net mvc框架创建的应用程序。我有一个问题,我的观点之一。我得到的死亡黄屏说,当我提出我的表格从客户端检测到有潜在危险的Request.Form值。我使用TinyMCE的我的RTE。我已经设置视图本身

I am converting an application I created using webforms to the asp.net mvc framework using vb.net. I have a problem with one of my views. I get the yellow screen of death saying "A potentially dangerous Request.Form value was detected from the client" when I submit my form. I am using tinymce as my RTE. I have set on the view itself

ValidateRequest =FALSE

ValidateRequest="false"

我知道在MVC它不尊重它从我迄今读到的观点。所以,我把它放在控制器动作为好。我曾尝试不同的设置:

I know that in MVC it doesn't respect it on the view from what I've read so far. So I put it on the controller action as well. I have tried different setups:

<ValidateInput(False), AcceptVerbs(HttpVerbs.Post)> _

......然后......

...and...

<AcceptVerbs(HttpVerbs.Post), ValidateInput(False)> _

......像这样,以及...

...and like this as well...

<ValidateInput(False)> _
<AcceptVerbs(HttpVerbs.Post)> _

只是为了看它是否发挥了作用,但我仍然获得死亡的黄色画面。我只是想将其设置为这一观点,并在我的控制器的具体行动,我的职位涉及。我缺少的东西吗?

Just to see if it made a difference, yet I still get the yellow screen of death. I only want to set it for this view and the specific action in my controller that my post pertains to. Am I missing something?

推荐答案

您确定被张贴的控制器动作是一个你对属性?

Are you sure that the controller action being posted to is the one you have the attributes on?

这篇关于为什么ValidateInput(假)不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆