tags:

views:

551

answers:

2

I have recently upgraded a project of mine from one of the beta builds of MVC to the full version.

I am getting the yellow screen of death on one of my inputs "A potentially dangerous Request.Form yada yada".

So I tried edting the pages validateRequest attribute, that didnt work.

Then I tried adding

[ValidateInput(false)]

To the offending action, but when I try and build it says the attribute doesn't exist.

So what do I do?

+1  A: 

It works at my site.

Can you try with a new plain website? I had some other strange behaviours (strongly typed views did not work), when I converted webs from beta to R1. Starting fresh and copying over the files to the new web always worked at the end.

Malcolm Frexner
+1  A: 

Incidentally, a breaking change in MVC 2 / ASP.NET 4 means [ValidateInput(false)] won't work unless you add the following to the <system.web> part of your web.config file:

<httpRuntime requestValidationMode="2.0" />
James McCormack