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

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

Greg BrainerdGreg Brainerd Posts: 9Questions: 1Answers: 0

I'm working with the Editor and I've tried both of your examples for the tinymce and ckeditor. Both give me the same error in the editor.cs when adding html to the database. I am testing a save with <b>.

Editor.cs (line 521)
list.Add(new KeyValuePair<string, string>(key, data[key])); <--- A potentially dangerous Request.Form value was detected from the client

I did add the XSS false flag in my controller's posting for the editor.
.Field(new Field("clientsnotes_tbl.body")
.Xss(false)

Not sure what else I need to do to disable this check.
Thanks,
Greg

Replies

  • Greg BrainerdGreg Brainerd Posts: 9Questions: 1Answers: 0

    I added requestValidationMode="2.0" to my httpRuntime tag in the web.config which resolved the issue.

    <httpRuntime targetFramework="4.5.2" requestValidationMode="2.0"/>

  • allanallan Posts: 61,928Questions: 1Answers: 10,153 Site admin

    Thanks for posting back - that's the prefect way to address this.

    Regards,
    Allan

This discussion has been closed.