I just spent part of two days battling an exception while waiting on a response from a web service.
---> System.Net.WebException: The server committed a
protocol violation. Section=ResponseStatusLine at
I found all sorts of suggestions to fix the issue. Most of them involved adding the following information to your web.config:
<httpWebRequest useUnsafeHeaderParsing="true" />
I even found a post that suggested you override the WebRequest method within your proxy class (seems like a bad idea because if you ever regenerate your proxy class ... well, you know what'll happen to your "fix").
protected override WebRequest GetWebRequest(Uri uri)
HttpWebRequest request = (HttpWebRequest)base.GetWebRequest(uri);
request.ProtocolVersion = HttpVersion.Version10;
Anyway, after neither of those solutions had worked, my Google resources were running low. I kept noticing that all of the posts mentioned .Net 1.1 ...
So I changed the webservice to use 2.0 (this is a COTS product and installs to 1.1 by default) and voila. No more nasty gram.
Perhaps this will help someone.