S A M P L E S

Defining a proxy server

When generating proxy classes using Microsoft .NET, the proxy class derives from System.Web.Services.Protocols.SoapHttpClientProtocol.   This class defines a Proxy property which can be used to define an HTTP Proxy server to used when using the proxy class to communicate with a Web service.  The Proxy must a type of Sys.Net.IWebProxy.  
 

 

MapService_MapServer mapservice = new MapService_MapServer();

mapservice.Url = "http://localhost/arcgis/services/MapService/MapServer";

 

IWebProxy webProxy = new WebProxy("http://proxy.server.com:8081", false);

mapservice.Proxy = webProxy;