7

I'm getting the above exception when I'm trying to submit a form in ASP.NET. This post was really helpful but even after setting ValidateRequest="false" I get this error only for "&#" combination. This specific combination is required since we are using Norwegian characters.

And I have set httpRuntime requestValidationMode="2.0" in web.config as well.

Community
  • 1
  • 1
Geethanga
  • 1,816
  • 4
  • 19
  • 31
  • is working to me fine, and not get errors even when I send this characters. Maybe you make some redirect and you do not have place the validaterequest to all page. Better try to add it to web.config. – Aristos May 23 '12 at 11:18
  • Yes you were correct. It works when I add it to web.config – Geethanga May 23 '12 at 12:09

1 Answers1

2

Ok, from the comments, I make it also as an answer.

Place the ValidateRequest="false" on the web.config to prevent the case that its hit on a forgotten page with out this declaration.

<pages validateRequest="false" ... >
Aristos
  • 63,580
  • 14
  • 112
  • 146
  • This worked for me, and you along with this you should have httpRuntime requestValidationMode="2.0" in web.config file. – Geethanga Jun 04 '12 at 15:17