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?
Asked
Active
Viewed 134 times
1

Soner Gönül
- 97,193
- 102
- 206
- 364

Supreet
- 2,451
- 8
- 25
- 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 Answers
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,691
- 3
- 29
- 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,177
- 9
- 29
- 47