Home All Groups Group Topic Archive Search About

HttpWebRequest and Request.form validation error.

Author
20 Feb 2007 3:40 PM
fedrok
Hi!
I've got a problem with HttpWebRequet class.
I've to make a POST http sendind a data stream.
This data stream contains some "<" characters and so I get an internal
server error 500 described as this:

A potentially dangerous Request.Form value was detected from the client...

How can I disable the validation?
I'm not using an asp.NET page, but a console application, so I can't use the
declaration
validateRequest = "false" in '<@Page >' directive.

Any suggestions?

Thx!

--
fedrok

Author
20 Feb 2007 4:01 PM
Joerg Jooss
Thus wrote fedrok,

> Hi!
> I've got a problem with HttpWebRequet class.
> I've to make a POST http sendind a data stream.
> This data stream contains some "<" characters and so I get an internal
> server error 500 described as this:
> A potentially dangerous Request.Form value was detected from the
> client...
>
> How can I disable the validation?

Disable it on the server-side or don't post hazardous content, i.e. HTML-encode
your content.

Cheers,
--
Joerg Jooss
news-re***@joergjooss.de
Author
20 Feb 2007 4:15 PM
fedrok
The problem wasn't in the sender procedure!
But in the remote responder!!!!
I've added the ValidateRequest attribute in the <@Page> directive, and all
works!!!!

Thx!
--
fedrok


Show quote
"fedrok" wrote:

> Hi!
> I've got a problem with HttpWebRequet class.
> I've to make a POST http sendind a data stream.
> This data stream contains some "<" characters and so I get an internal
> server error 500 described as this:
>
> A potentially dangerous Request.Form value was detected from the client...
>
> How can I disable the validation?
> I'm not using an asp.NET page, but a console application, so I can't use the
> declaration
> validateRequest = "false" in '<@Page >' directive.
>
> Any suggestions?
>
> Thx!
>
> --
> fedrok

AddThis Social Bookmark Button