J
joseph_gallagher
Hi,
I'm not sure if this is the right place to post this but when
searching for the exception I got this group came up the most.
I'm making a HttpWebRequest to get data from a web page but am getting
the following error
System.Net.WebException: The server committed a protocol violation.
Section=ResponseBody Detail=Response chunk format is invalid
at System.Net.HttpWebRequest.GetResponse()
I've looked in the groups and the recomended fix for this error is to
set
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
in the App.config but this isnt working for me, playing around I find
that if I set the version in the HttpWebRequest to 1.0 like so
HttpWebRequest hwr = (HttpWebRequest)
HttpWebRequest.Create(url.Text);
hwr.ProtocolVersion = new System.Version(1,0);
then everything runs fine, running a packet sniffer I see this is
becuase I'm not recieving the data chunked, is there a header I can
set so I can carry on using 1.1 but not get chunked data as this is
obviously whats causing the problem and I dont really want to use http
1.0.
Failing that does anyone know what is causing this problem?
I'm not sure if this is the right place to post this but when
searching for the exception I got this group came up the most.
I'm making a HttpWebRequest to get data from a web page but am getting
the following error
System.Net.WebException: The server committed a protocol violation.
Section=ResponseBody Detail=Response chunk format is invalid
at System.Net.HttpWebRequest.GetResponse()
I've looked in the groups and the recomended fix for this error is to
set
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
in the App.config but this isnt working for me, playing around I find
that if I set the version in the HttpWebRequest to 1.0 like so
HttpWebRequest hwr = (HttpWebRequest)
HttpWebRequest.Create(url.Text);
hwr.ProtocolVersion = new System.Version(1,0);
then everything runs fine, running a packet sniffer I see this is
becuase I'm not recieving the data chunked, is there a header I can
set so I can carry on using 1.1 but not get chunked data as this is
obviously whats causing the problem and I dont really want to use http
1.0.
Failing that does anyone know what is causing this problem?