WSDualHttpBinding.ClientBaseAddress 属性

定义

获取或设置客户端的基址。

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

属性值

Uri

为客户端基址的 Uri。 默认值是 null

示例

下面的示例演示如何在配置文件中指定 wsDualHttpBinding 绑定。

WSDualHttpBinding dualBinding = new WSDualHttpBinding();
EndpointAddress endptadr = new EndpointAddress("http://localhost:12000/DuplexTestUsingCode/Server");
dualBinding.ClientBaseAddress = new Uri("http://localhost:8000/DuplexTestUsingCode/Client/");
Dim dualBinding As New WSDualHttpBinding()
Dim endptadr As New EndpointAddress("http://localhost:12000/DuplexTestUsingCode/Server")
dualBinding.ClientBaseAddress = New Uri("http://localhost:8000/DuplexTestUsingCode/Client/")

注解

当协定是双工协定时,该客户端的公共 URI 提供服务联系客户端所需的回调终结点。

适用于