By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

HttpWebRequest.GetResponse Error and useUnsafeHeaderParsing

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.