471,348 Members | 1,339 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

HttpWebRequest.GetResponse Error and useUnsafeHeaderParsing

I post this question last week, no good answer, so I post again. Sorry about
this.

I use WebRequest.Create/WebRequest.GetResponse to handle HTTP request in a
VS2003 project. I got HTTP violation exception on some of the machine. So I
did the research, and found to put <useUnsafeHeaderParsing ="true"> in
app.config can fix the problem. The machines have framework 1.1 installed,
even useUnsafeHeaderParsing is an attribute of version 2.0

Here is the detailed of error:
The server committed an HTTP protocol violation.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)
at System.Net.HttpWebRequest.GetResponse()

But the app.config cause problem on other machines which work fine without
application config file. The exception is <Unrecognized attribute
'useUnsafeHeaderParsing'>. I use framework1.1 on this machine. Install
framework2.0 did not fix the problem.

I converted project to VS2005, it is OK to put the application config in all
PCs.

Because my application will distribute to other user's machines, the users
is not IT professional. And I don't want to convert the project to VS2005
now, any solutions to fix the problem in VS2003?

Thanks.
Jan 4 '06 #1
1 6813
Hello MikeZ,
I post this question last week, no good answer, so I post again. Sorry
about this.

I use WebRequest.Create/WebRequest.GetResponse to handle HTTP request
in a VS2003 project. I got HTTP violation exception on some of the
machine. So I did the research, and found to put
<useUnsafeHeaderParsing ="true"> in app.config can fix the problem.
Aahh, that's not a fix but a security hole. You're receiving illegal HTTP
header content.
The machines have framework 1.1 installed, even useUnsafeHeaderParsing
is an attribute of version 2.0
No, it was introduced in .NET 1.1 SP1 and kept secret ;-)
See http://support.microsoft.com/kb/888528/en-us
Here is the detailed of error:
The server committed an HTTP protocol violation.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult
asyncResult)
at System.Net.HttpWebRequest.GetResponse()
But the app.config cause problem on other machines which work fine
without application config file. The exception is <Unrecognized
attribute 'useUnsafeHeaderParsing'>. I use framework1.1 on this
machine. Install framework2.0 did not fix the problem.


Do these have SP1 installed?

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Jan 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Gregory A Greenman | last post: by
1 post views Thread by Jeff B | last post: by
5 posts views Thread by bg | last post: by
3 posts views Thread by JansenH | last post: by
4 posts views Thread by =?Utf-8?B?SmltIE93ZW4=?= | last post: by
1 post views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.