HttpRequestValidationException in Request.Form
I am writing a CMS in C# and a html editor in the asp.net page. Therefore, I got some HTML code in Request.Form Object. Last night, I found the problem. I got HttpRequestValidationException when I save a html content. That is safe by rejecting any post variables has html code. So, I tried the used [ValidateInput(false)] in the controller, that is not working. Finally, I found I need to turn off that globally in web.config
Please remember to use <httpRuntime requestValidationMode="2.0" /> for switching the validation mode into 2.0, unless just turn off validate request is not enough!
Trackback address for this post
Feedback awaiting moderation
This post has 187 feedbacks awaiting moderation...
Form is loading...