WCF:在客户端,获取端点Ip地址

WCF:在客户端,获取端点Ip地址,wcf,Wcf,可以在WCF中获取客户端的Ip地址吗 在服务端,我们可以使用OperationContext.current获取Ip地址 同样的方法我也能进入客户端吗 提前感谢当然-如果您创建了客户端,您可以获得其端点: YourServiceClient client = new YourServiceClient(); string endpointAddress = client.Endpoint.Address.Uri.ToString();

可以在WCF中获取客户端的Ip地址吗

在服务端,我们可以使用OperationContext.current获取Ip地址

同样的方法我也能进入客户端吗


提前感谢

当然-如果您创建了客户端,您可以获得其端点:

YourServiceClient client = new YourServiceClient();
string endpointAddress = client.Endpoint.Address.Uri.ToString();