简体   繁体   English

正在运行的 WCF 服务的 URL/端点地址

[英]The URL/Endpoint Address of a running WCF service

I have a WCF service (A) that runs in a web type container (IIS etc etc).我有一个在 web 类型容器(IIS 等)中运行的 WCF 服务(A)。 I need to send the endpoint address/URL of this service (A) to another service (B).我需要将此服务 (A) 的端点地址/URL 发送到另一个服务 (B)。 The service (A) is configured via web.config and the system.serviceModel tags.服务 (A) 通过 web.config 和 system.serviceModel 标签配置。 How can I find the endpoint address/URL of the service (A) in c#.如何在 c# 中找到服务 (A) 的端点地址/URL。

Have you looked at OperationContext.Current.EndpointDispatcher.EndpointAddress你看过OperationContext.Current.EndpointDispatcher.EndpointAddress

From MSDN Documentation : 从 MSDN 文档

Gets the address of the endpoint.获取端点的地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM