Does anybody know why I am unable to turn request validation off. I currently have an ASP.NET MVC application that has been set up with Sitecore 8.1.
I have created an action method on a controller that I am using to import some data into the sitecore database (specifics out of scope for this question).
One of the fields I'm sending up contains HTML markup so I'm getting the following error message:
A potentially dangerous Request.Form value was detected from the client (mainContent="<p>Learning and Deve...")
For some unknown reason I can't turn this feature off.
I have tried the following:
- Added AllowHtml to specific property of my Model.
- Added pages element to web config with validateRequest="false"
- Ensured httpRuntime element attribute requestValidationMode="2.0" is set
- Yes I have confirmed the correct action method is being hit. If I remove the HTML markup from the POST then is succeeds.
- I have added [ValidateInput(false)] to the Controller Action method.
A can't think where else to look. Any ideas anyone? Sorry I know this question has been posted before but I have tried everything.