Gets or sets proxy information for making an XML Web service request through a firewall.
Assembly: System.Web.Services (in System.Web.Services.dll)
<BrowsableAttribute(False)> _ Public Property Proxy As IWebProxy Get Set
[BrowsableAttribute(false)] public IWebProxy Proxy { get; set; }
[BrowsableAttribute(false)] public: property IWebProxy^ Proxy { IWebProxy^ get (); void set (IWebProxy^ value); }
[<BrowsableAttribute(false)>] member Proxy : IWebProxy with get, set
Property Value
Type: System.Net.IWebProxyAn 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.
Dim math As New MyMath.Math() ' Set the proxy server to proxyserver, set the port to 80, and specify ' to bypass the proxy server for local addresses. Dim proxyObject As New WebProxy("http://proxyserver:80", True) math.Proxy = proxyObject ' Call the Add XML Web service method. Dim total As Integer = 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.Proxy = proxyObject; // Call the Add XML Web service method. int total = math.Add(8, 5);
MyMath::Math^ math = gcnew 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 = gcnew WebProxy( "http://proxyserver:80",true );
math->Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math->Add( 8, 5 );
.NET Framework
Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0.NET Framework Client Profile
Supported in: 4, 3.5 SP1Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.