ASP.NET MVC A potentially dangerous Request.Form value was detected from the client when using a custom modelbinder

前端 未结 5 1843
感情败类
感情败类 2020-11-29 18:44

Getting the error here:

ValueProviderResult value = bindingContext.ValueProvider.GetValue(\"ConfirmationMessage\");

How do I allow on a sel

5条回答
  •  情深已故
    2020-11-29 19:23

    As Mike Godin wrote, even if you set [ValidateInput(false)] attribute, you have to use Request.Unvalidated.Form instead of Request.Form This worked for me with ASP.NET MVC 5

提交回复
热议问题