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 if I try to make the consecutive PUT or PATCH requests on a same connection in this case only my first request executes accurately and also I receive the response correctly but my second request fails and it does not include any body in my request and then I receive the following error
"The server committed a protocol violation. Section=ResponseStatusLine".
I know it is a very common error but it has very few known solutions available which I have already tried. I have tried a solution which involves the setting a useUnsafeHeaderParsing property to the value as true and also set my Keep-Alive property to the value as false in my Web.Config. But somehow it is not working for me.
I am unable to fix above error. I am looking for somebody who can help me in fixing above error.