WSDualHttpBinding.ProxyAddress 属性

定义

获取或设置 HTTP 代理的 URI 地址。

public:
 property Uri ^ ProxyAddress { Uri ^ get(); void set(Uri ^ value); };
public Uri ProxyAddress { get; set; }
member this.ProxyAddress : Uri with get, set
Public Property ProxyAddress As Uri

属性值

Uri

一个充当 HTTP 代理地址的 Uri。 默认值是 null

示例

下面的示例演示如何指定 HTTP 代理的地址。

string proxyAddressString = "http://localhost:5049";
Uri proxyBaseAddressUri = new Uri(proxyAddressString);
binding.ProxyAddress = proxyBaseAddressUri;
Dim proxyAddressString As String = "http://localhost:5049"
Dim proxyBaseAddressUri As New Uri(proxyAddressString)
binding.ProxyAddress = proxyBaseAddressUri

注解

如果将 UseDefaultWebProxy 设置为 true,将忽略 ProxyAddress 的值。

适用于