ValidateInputAttribute bug in VS 2010 RC / ASP.NET MVC 2.0?

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-03-18T22:55:18Z Indexed on 2010/03/18 23:01 UTC
Read the original article Hit count: 290

Filed under:

Am I doing something wrong here?

I have a text area on a view and am posting back the html contents. In VS 2008 and MVC 1.0 the following code successfully prevents input validation:

[HttpPost]
[ValidateInput(false)]
public ActionResult Index(int? id)
{
    return View();
}

If I execute this code in VS 2010 / MVC 2.0 I always get this error:

A potentially dangerous Request.Form value was detected from the client (body="
").

Any ideas?

© Stack Overflow or respective owner

Related posts about asp.net-mvc