S A M P L E S
Modifying
HTTP request properties
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 =
(System.Net.HttpWebRequest)base.GetWebRequest(uri);
webRequest.KeepAlive = false;
webRequest.ProtocolVersion = System.Net.HttpVersion.Version10;
return webRequest;
}
}