Published on: 02 January, 2014

A potentially dangerous Request.Form value was detected from the client when submitting html content in ASP.Net MVC.

Posted by andy | 2033 views 0 likes 1 favourites 0 comments
Tumblr Digg Google Plus

You may get this error message A potentially dangerous Request.Form value was detected from the client when you try to submit a html content on your site. By default validation input is turned on, this is used to reduce the possibility hack or attack on your site. When you decide to disable this make sure it is only apply to the specific page of your site.

How to solve this issue in MVC?

To solve this issue is pretty simple, in your controller action view, you just need to set the ValidationInput to false. See below example.

[HttpPost]
[ValidateInput(false)]
public ActionResult SubmitContent(string value) {

}
Comments

There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.
Related Articles
Published on: 28 October, 2016

In this tutorial you will learn how easily you can implement a simple checkout express using C# MVC Web API. We will create a really simple shopping cart where customers can add and delete their cart items before proceed to payment.