Showing results for 
Search instead for 
Did you mean: 

Using WebServices within .NET offered by NetWeaver Server.

Former Member
0 Kudos

Hi Guys,

I had problems with using a NetWeaver WebService within .NET since I got error messages such as:

- The server committed a protocol violation. Section=ResponseStatusLine

- Unexpected network error. The connection was closed unexpectedly.

In my opinion there are two reasons for those issues: at first the HTTP 1.1 protocol implementation from NetWeaver and Microsoft seem not to be compatible. Another issue is that Microsoft seems to try to let the connection to the server open in order to reduce connection overhead.

The solution that I have found is as follows:

Just edit the .cs file that was generated according to your .wsdl file. (i.e. Reference.cs) There add the following lines in the main class:

protected override System.Net.WebRequest GetWebRequest(Uri uri)


HttpWebRequest webRequest = (HttpWebRequest)base.GetWebRequest(uri);

webRequest.ProtocolVersion = HttpVersion.Version10;

webRequest.KeepAlive = false;

return webRequest;


The most important line is imho the ProtocolVersion = HttpVersion.Version10. For being on the safe side it is also adviseable to switch off the KeepAlive issue.

Perhaps one of you had the same problems and has a other/better solution. I would be glad to know it.


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Dimitar,

Can you please provide more details of this known issue in SAP?

We are running R/3 4.7 and experiencing the same problems and are on the latest ICM component, on support pack we are at:


Thanks in Advance,



0 Kudos

Hi Christian,

This is a known issue. Please upgrade to the latest SP of the engine.