1

i am using mce editor in a user control and added ValidateRequest="false" in page directive on which i have used that control then also I am getting "A potentially dangerous Request.Form value was detected" error. How to solve this?

Soner Gönül
  • 94,086
  • 102
  • 195
  • 339
Supreet
  • 2,351
  • 7
  • 23
  • 42
  • see [this](http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client) – Iswanto San Mar 08 '13 at 08:04

2 Answers2

1

In order for the ValidateRequest="false" attribute to be applied, you must add the following entry

<httpRuntime requestValidationMode="2.0" /> 

to your web.config.

Freeman
  • 5,461
  • 3
  • 27
  • 41
1

If you are using .NET 4 you may need to change your web config too.

<httpRuntime requestValidationMode="2.0" /> in web.config.

When you change page like validateRequest="false" make sure you are HTML encoding strings.

DSharper
  • 3,137
  • 9
  • 28
  • 46