• Register
1 vote
175 views

Problem :

Facing bellow error
the server committed a protocol violation. section=responseheader detail=cr must be followed by lf
6.9k points

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>
36.1k points

Related questions

1 vote
1 answer 24 views
24 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 morrisBson 3.2k points
0 votes
1 answer 70 views
70 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
1 vote
1 answer 9 views
9 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 Raphael Pacheco 3.2k points
0 votes
1 answer 30 views
30 views
Problem : I am facing below error if I try to export datagrid to the excel. &ldquo;Control 'gridview1' of type 'gridview' must be placed inside a form tag with runat=server.&rdquo; Please find below my code : <form runat="server" id="form1"> <div runat="server" id=" ... TextBox> </form> My GridView is within the from tag with the runat="server", but still I am facing above error. How to fix this?
asked Feb 17 mphil 2.3k points