HTTP headers and .NET 1.1 SP1

G

Guest

After installing .NET 1.1 SP1, HttpWebRequest will throw an exception when
connecting to servers that are using improperly formatted headers. Several
developer blogs have posted a workaround that requires inserting the
following
into the app.config file:

<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>

However, this poses challenges for machines that do not have SP1 installed.

I have also seen code that enables this by using reflection to change
private fields on the HttpWebRequest class. Is there a programmatic way to
turn on unsafe header parsing without resorting to reflection?

Thanks for any assistance!
 
C

Chad Z. Hower aka Kudzu

=?Utf-8?B?TCBTcGVuY2Vy?= said:
I have also seen code that enables this by using reflection to change
private fields on the HttpWebRequest class. Is there a programmatic way
to turn on unsafe header parsing without resorting to reflection?

Try Indy - its free and has full support for HTTP.

http://www.indyproject.org/


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top