1

I am Getting this error

A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$txtEmbed="<embed src='http://a...").

when i am opening a modalpopup extender on link button click and in code behind i am assigning the textbox

value="<embed src='http://auddia.com/player-viral.swf' height='20' width='200' allowscriptaccess='always' flashvars='volume=100&autostart=false&file=http://auddia.com/Audios/audioStream_1299222864888_19.flv&plugins=viral-1d'/>

and also i set the ValidateRequest="false" in the page directive's. and in code behind i also use HttpUtility.HtmlEncode . but again and again i am facing this error

"A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$txtEmbed="<embed src='http://a...").".

Please help me ASAP.

Stecya
  • 22,896
  • 10
  • 72
  • 102
Anil
  • 11
  • 1
  • 3
  • What's the value of txtEmbed that's causing this? – Russ Cam Mar 07 '11 at 06:45
  • 1
    @Stecya: Where in the world did all that additional information come from? Lots of the stuff you edited in wasn't in the original question. – Cody Gray - on strike Mar 07 '11 at 07:07
  • possible duplicate of [A potentially dangerous Request.Form value was detected from the client](http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client) – Barmar Jan 08 '13 at 17:10

2 Answers2

3

Try adding this to your web.config.

<configuration>
  <system.web>
   <httpRuntime requestValidationMode="2.0" />
  </system.web>
</configuration>
Andy Gaskell
  • 31,495
  • 6
  • 74
  • 83
  • Another option is to write custom validator explained [here](http://msmvps.com/blogs/luisabreu/archive/2010/01/05/oh-gosh-validating-user-input-is-extensible.aspx) – Adeel Mar 07 '11 at 07:05
0
<system.web>
    <httpRuntime requestValidationMode="2.0" />
</system.web>
Praveen Prasad
  • 31,561
  • 18
  • 73
  • 106