473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 6973
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
1
by: Jeff B | last post by:
I'm trying to create a simple screen scraping application and I kept getting a System.Net.WebException thrown back with a message of "The operation has timed-out." At first I thought it was some...
2
by: Steve Richter | last post by:
I have a page that uses simple HTTP GET to do an ISBN lookup via Amazon.com. The page works when I run it from //localhost. But I have moved it to my godaddy.com shared hoster site, and I get...
2
by: GlennLanier | last post by:
Hello, I've searched the forums and can't find an answer -- if it i there, kindly point me in that direction. I would like to simulate a browser POSTing a FORM and be able to pars the response....
7
by: Tom | last post by:
Hello all: I have a method that does a POST to a secured website using HttpWebRequest. It worked when logging in the site, but it failed with an HTTP prococol violation error when it is used to...
5
by: bg | last post by:
Hi all. I 'm trying to automate some of my workflow, by doing some programmatic "POST"s to an internal webserver via HttpWebRequest. The Code is your usual straight forward type of thing. ...
3
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
5
by: mr.newsgroupguy | last post by:
I am working in C# .NET 1.1. My app has a button on its main form that checks to see if it has access to a file on our server, just an XML file. On our server we are running W2K IIS with a...
4
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi, I've run into a set of errors I don't understand coming back from HttpWebRequest.GetResponse, In one case, null is returned from the request without an Exception and in the other the request...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.