Export (0) Print
Expand All
0 out of 2 rated this helpful - Rate this topic

HttpWebClientProtocol.Proxy Property

Gets or sets proxy information for making an XML Web service request through a firewall.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)
public IWebProxy Proxy { get; set; }
/** @property */
public IWebProxy get_Proxy ()

/** @property */
public void set_Proxy (IWebProxy value)

public function get Proxy () : IWebProxy

public function set Proxy (value : IWebProxy)

Not applicable.

Property Value

An IWebProxy that contains the proxy information for making requests through a firewall. The default value is the operating system proxy settings.

Use the Proxy property if a client needs to use different proxy settings than those in the system settings. Use the WebProxy class to set the proxy settings, because it implements IWebProxy.

Default proxy settings can be set in a configuration file. For details, see Configuring Internet Applications.

The following example sets the following proxy settings prior to invoking the Math XML Web service: the proxy server to http://proxyserver, the proxy port to 80 and the bypass to the proxy server for local addresses.

MyMath.Math math = new MyMath.Math();

// Set the proxy server to proxyserver, set the port to 80, and specify to bypass the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);
math.Proxy = proxyObject;

// Call the Add XML Web service method.
int total = math.Add(8, 5);

MyMath.Math math = new MyMath.Math();

// Set the proxy server to proxyserver, set the port to 80, 
// and specify to bypass the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);
math.set_Proxy(proxyObject);

// Call the Add XML Web service method.
int total = math.Add(8, 5);

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.