.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Post New Web Links

Why do I get "The server committed a protocol violation"?

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net
 

Hi everyone,

I have an HTTPHandler class that is making an HTTP request string with the
HttpWebRequest.GetRequest and HttpWebResponset.GetResponse, but gets an error at The server committed a protocol violation. Section=ResponseStatusLine.
I ran some search and found a way to solve this issue by modifying some parameters directly through the configuration file as follow and I got a Warning and an Error at The element 'system.web' has invalid child element 'system.net'.  and Unrecognized configuration section system.web/system.net.  Can someone tell me why I got this error and how do I fix this to make it works? thanks a lot!

<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>

 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 Exception Details: System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine

Source Error:




View Complete Post


More Related Resource Links

"The server committed a protocol violation. Section=ResponseStatusLine"

  

i am getting "The server committed a protocol violation. Section=ResponseStatusLine"

error whan calling webservice form my windows application

 

thanks


WCF client with internet proxy server showing error The server committed a protocol violation. Secti

  

Our team trying to create a windows application(c#) to call a WCF service using internet proxy server

Showing exception "The server committed a protocol violation. Section=ResponseStatusLine" while calling WCF service

when i tried to solve the problem using this code then showing the same error

 

<configuration>
   
<system.net>
       
<settings>
           
<httpWebRequest useUnsafeHeaderParsing="true" />
       
</settings>
   
</system.net>
</configuration>

 

Please give suggestion to solve this problem/any alternative solution

 

The server committed a protocol violation. Section=ResponseStatusLine

  

Hello, 

I have a function that send the request by the HttpWebRequest and get the HttpWebResponse from that request but I have the server committed a protocal violation. Section=ResponseStatusLine failed at the HttpWebResponse response = (HttpWebResponse)request.GetResponse();  Can someone shows me the right direction of what I did wrong? thanks.

Here is an error:

The server committed a protocol violation. Section=ResponseStatusLine

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine

Source Error:

Line 276:                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
Line 277: // execute the request
Line 278: HttpWebResponse response = (HttpWebResponse)request.GetResponse();

The server committed a protocol violation. Section=ResponseStatusLine

  

Hello all,

I wonder if anybody came across the follwing issue (exactly the same issue was reported under http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=704745&SiteID=1 and under http://groups.google.com/group/microsoft.public.windowsce.embedded/browse_thread/thread/1270892027ee6c21):
We (our customer, to be precise) are making a simple web request call to our server which goes through the web proxy that requires authentication. Most of the time the request fails with "The server committed a protocol violation. Section=ResponseStatusLine" although sometimes it succeeds - there is no pattern with regards to that behavior. After enabling System.Net

FtpWebRequest GetResponse throw The server committed a protocol violation :(

  

Hello.

I have some trouble with FtpWebRequest class.

I use it for connection to two ftp servers

The first server is working perfectly, but when i use the same programm to connect to another one the "The underlying connection was closed: The server committed a protocol violation." exception is thrown when I call GetResponse method.

I found only one difference between servers.

The first server returns:

  • 220 Hello k-net ftp server

The second FTP return the same banner but ON RUSSIAN Lang!!!

  • 220 ?????? ?? ???! ?????????!

Is any UseUnsafeHeaderParsing property exists for FTPWebRequest, like for HTTP?

P.S> I'am not using SSL!

The sources is here:

///...

FtpWebRequest listRequest =

(FtpWebRequest)WebRequest.Create(listUrl);

listRequest.UsePassive = false; //true

listRequest.Method = WebRequestMethods.

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend