• Register
1 vote
485 views

Problem :

Facing bellow error
the server committed a protocol violation. section=responseheader detail=cr must be followed by lf
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

This is definitely the problem related to server. Probably the server is not following the HTTP specification and so the .NET client has flagging this as a potential problem. 

There is no security issue here but only non-compliance with the RFC. 

So to resolve the problem please apply the bellow configuration change:

<configuration> 
 <system.net> 
  <settings> 
   <httpWebRequest useUnsafeHeaderParsing="true" /> 
  </settings> 
 </system.net> 
</configuration>
9 7 4
38,600 points

Related questions

1 vote
1 answer 217 views
217 views
Problem : Currently I am learning the use of HttpClient class. Also I have started using the HttpClient class to communicate with the web service in my current WPF application. If I try to make the consecutive GET requests on my same connection then everything works perfectly. But ... working for me. I am unable to fix above error. I am looking for somebody who can help me in fixing above error.
asked Apr 2, 2020 morrisBson 3.2k points
0 votes
1 answer 130 views
130 views
Problem : I am trying to use the WCF4.0 template -REST. Also I am trying to make the method that uploads a file using the stream. The problem always occur at below line of code: Stream myserverStream = myrequest.GetRequestStream() ... connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 40 views
40 views
Problem : Getting &ldquo;Handshake failed&hellip;unexpected packet format&rdquo; when using WebClient.UploadFile() with &ldquo;https&rdquo; when the server has a valid SSL certificate. Any ideas on what I need to do to fix this? Thanks!
asked Mar 20 Sabbir Hossain 14.6k points
0 votes
1 answer 19 views
19 views
Problem: Why I got the error > Established connection failed because connected host has failed to respond
asked May 1 ummeshani 10.8k points
0 votes
1 answer 7 views
7 views
Problem: The code is working fine for Windows Serer 2008 and Windows 7 Remote PCs. But when I attempt anything higher than 2008 / Win 7, in this case a Windows 10 PC I get an error."The connection cannot proceed because authentication is not enabled and the remote computer requires that authentication be enabled to connect."Can anyone give me some direction?
asked May 2 sumaiya simi 43.9k points
0 votes
1 answer 14 views
14 views
Problem: invalid uri: the format of the uri could not be determined.
asked Feb 17 charles mathews 5.5k points
0 votes
2 answers 51 views
51 views
Problem : System.Net.WebException: The operation has timed out
asked Feb 20 Sabbir Hossain 14.6k points
1 vote
1 answer 34 views
34 views
Problem: I am having fundamental knowledge on C#. Currently I am unable to connect to the HTTPS server with the use of WebRequest as I am facing below error message: "The request was aborted: Could not create SSL/TLS secure channel." I understand that my ... my server never really validates a certificate and it fails with a above error. Kindly guide me in fixing above certificate related error.
asked Jun 30, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 4 views
4 views
Problem: What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I provide. Now, I want to save the path value to a file for later ... , I would like to see code example of that (C#). I have seen other discussions on this subject, but it is still not clear to me.
asked Apr 25 sumaiya simi 43.9k points