为什么 ValidateInput(False) 不起作用?

编程入门 行业动态 更新时间:2024-10-14 18:18:23
本文介绍了为什么 ValidateInput(False) 不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在将使用 webforms 创建的应用程序转换为使用 vb 的 asp mvc 框架.我的观点之一有问题.当我提交表单时,我收到了黄色的死亡屏幕,提示从客户端检测到一个潜在危险的 Request.Form 值".我使用 tinymce 作为我的 RTE.我已经设置了视图本身

I am converting an application I created using webforms to the asp mvc framework using vb. 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)> _

……还有……

<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(False) 不起作用?

本文发布于:2023-11-24 01:13:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623429.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不起作用   ValidateInput   False

发布评论

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

>www.elefans.com

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