0

I know this asked many times but I have different use case. Here it goes.

I have audit trails implemented and I do log every single request. When user submits a post I log user data as well, whatever she/he posts in the form.

Then i get back this error.

I do have [AllowHtml] annotation also i have done stuff that s recommended on other questions but i dont want to disable request validation. Request passed through my ActionResult.

I have this code that breaks it.

return Json.Encode(new { request.Cookies, request.Headers, request.Files, request.Form, request.QueryString, request.Params });

How can i do this?

DarthVader
  • 52,984
  • 76
  • 209
  • 300
  • Have you tried getting the request data using `request.Unvalidated()` as in `request.Unvalidated().Form`? See [this question](http://stackoverflow.com/questions/12467249/how-can-i-access-unvalidated-items-in-the-request-form-collection-in-mvc-3) – Daniel J.G. Aug 27 '14 at 17:17
  • Well that didnt work:( – DarthVader Aug 27 '14 at 18:43

0 Answers0