Modifying HTTP request properties

You can change web request properties by subclassing the ArcGIS Server web service proxy class and overriding the GetWebRequest method. This will give you access to the .NET HttpWebRequest class on which you can change properties such as KeepAlive and ProtocolVersion. The following example illustrates how to change the aforementioned properties:

public class ExtendedMyMapServiceProxy : MyMapServiceProxy


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


            System.Net.HttpWebRequest webRequest =


            webRequest.KeepAlive = false;

            webRequest.ProtocolVersion = System.Net.HttpVersion.Version10;


            return webRequest;