验证与Request.Unvalidated()在ASP MVC 3 RC和.NET 4的请求 [英] Validate request with Request.Unvalidated() in ASP MVC 3 RC and .NET 4
问题描述
我有同样的问题如下:
<一个href="http://stackoverflow.com/questions/4361907/asp-net-mvc-3-validaterequestfalse-not-working-with-formcollection">ASP.NET MVC 3 ValidateRequest(假)不工作的FormCollection
我已经尝试添加引用 System.Web.Helpers
的dll,并增加了使用 System.Web.Helpers
在我的控制器,但它不会接受未经验证的()
作为下请求
。使用.NET 4和MVC 3 RC。林
I have tried to add a reference to the System.Web.Helpers
dll, and added a using System.Web.Helpers
in my controller, but it wont accept Unvalidated()
as a method under Request
. Im using .NET 4 and MVC 3 RC.
推荐答案
在未经验证的()
扩展方法是在的System.Web定义。 WebPages.dll
组装,而不是 System.Web.Helpers.dll
(但仍处于 System.Web.Helpers
命名空间)
The Unvalidated()
extension method is defined in the System.Web.WebPages.dll
assembly, not System.Web.Helpers.dll
(but still in the System.Web.Helpers
namespace)
抱歉的混乱。
这篇关于验证与Request.Unvalidated()在ASP MVC 3 RC和.NET 4的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!