Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何枚举我的 WCF 服务正在侦听的端点?我发现了几篇博文列举了已配置的端点(通过查看 App.config),但这并没有帮助。
我正在托管一个以编程方式配置自身的 WCF 服务,并且我想获取它正在侦听的端点列表,以便写入日志文件。
var serviceHost = new ServiceHost(...); var endpoints = serviceHost.Description.Endpoints;