I need to send a request like this using HttpWebRequest:
POST https://sap.site.com.mx/sap/bw/BEx?SAP-LANGUAGE=ES&PAGENO=1&CMD=PROCESS_VARIABLES&REQUE
When using HTTP/1.1, Keep-Alive is on by default.Setting KeepAlive to false may result in sending a Connection: Close header to the server.
I had the same bug with the very similar code, and setting
var sp = req.ServicePoint;
var prop = sp.GetType().GetProperty("HttpBehaviour", BindingFlags.Instance | BindingFlags.NonPublic);
prop.SetValue(sp, (byte)0, null);
DID fix it. Are you sure that you do execute this code each time you create httpwebrequest?