可一个服务有多个终结? [英] Can a service have multiple endpoints?

查看:149
本文介绍了可一个服务有多个终结?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有具有只在支持的net.tcp一些设置的服务。什么是添加另一个端点的最好方法是什么?我是否需要创建一个完整的新的主机?

We have a service that has some settings that are supported only over net.tcp. What's the best way to add another endpoint? Do I need to create an entire new host?

推荐答案

一个服务可能有多个端点中的一台主机,但每个端点必须有地址,绑定和契约的独特组合。对于IIS托管服务(即一个.svc文件),只需设置端点的地址为相对的URI,并确保您的Visual Studio或Wsdl.exe用生成的客户端指定端点在其构造函数名称。

A service may have multiple endpoints within a single host, but every endpoint must have a unique combination of address, binding and contract. For an IIS-hosted service (that is, an .SVC file), just set the address of the endpoint to a relative URI and make sure that your Visual Studio or wsdl.exe generated client specifies the endpoint's name in its constructor.

另请参阅MSDN文章的 多个端点

See also the MSDN article Multiple Endpoints.

这篇关于可一个服务有多个终结?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆