views:

88

answers:

1

Using ASP.NET 4.0 and MVC 2, I have added these suggested modifications:

In the web.config -

<httpRuntime requestValidationMode="2.0"/>

To the Controller -

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

To the View Page -

   <%@ Page ValidateRequest="false" %>

I still receive the exception

A potentially dangerous Request.Form value was detected from the client

I am trying to use the MarkItUp editor in this way -

<%= Html.TextAreaFor( model => model.Description,"markitup")%>
+1  A: 

A work around for this issue is to set the validation mode to v2.0 instead of v4.0. To do this, add this httpRuntime line to your web.config, inside System.Web, along with using the <ValidateInput(false)> attribute

<system.web>
    <httpRuntime requestValidationMode="2.0"/>
</system.web>

I haven't found the reason yet, but this worked for me.

Jeff Schumacher
I just edited the question I am doing this..still does not work..
Misnomer
Sorry my bad...it was a different web config my page
Misnomer