Random thoughts about everything and nothing

The underlying connection was closed

leave a comment »

If you ever get the above error message from a (SAP) webservice…this might fix it (at this in the generated proxy).

protected override System.Net.WebRequest GetWebRequest(Uri uri)
            System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri);
            webRequest.KeepAlive = false;
            webRequest.PreAuthenticate = true;
            webRequest.ProtocolVersion = System.Net.HttpVersion.Version10;
            return webRequest;


Written by Michael

June 26, 2007 at 9:43 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: