我是WCF中的新手,很好奇地在WCF的各个部分进行探索。我得到了此url http://msdn.microsoft.com/en-us/library/ee358762(v=vs.110).aspx
从这里我看到了很多不同种类的终点,但我不知道这些端点,从未使用过
<endpoint address="net.tcp://localhost:5555/Calculator" binding="netTcpBinding"
contract="CalculatorInterFace.ICalculator" name="NetTcpBinding_ICalculator" />
我了解端点,它将具有服务地址URL和合同名称&amp;端点名称很大。
这里都是不同的端点
AnnouncementEndpoint
A standard endpoint that is used by services to send announcement messages.
DiscoveryEndpoint
A standard endpoint that is used by services to send discovery messages.
UdpDiscoveryEndpoint
A standard endpoint that is pre-configured for discovery operations over a UDP multicast binding.
UdpAnnouncementEndpoint
A standard endpoint that is used by services to send announcement messages over a UDP binding.
DynamicEndpoint
A standard endpoint that uses WS-Discovery to find the endpoint address dynamically at runtime.
ServiceMetadataEndpoint
A standard endpoint for metadata exchange.
WebHttpEndpoint
A standard endpoint with a WebHttpBinding binding that automatically adds the WebHttpBehavior behavior
WebScriptEndpoint
A standard endpoint with a WebHttpBinding binding that automatically adds the WebScriptEnablingBehavior behavior.
WebServiceEndpoint
A standard endpoint with a WebHttpBinding binding.
WorkflowControlEndpoint
A standard endpoint that enables you to call control operations on workflow instances.
WorkflowHostingEndpoint
A standard endpoint that supports workflow creation and bookmark resumption.
那么,我怎么知道我应该使用哪个端点,以及何时?我如何知道语法对于不同类型的端点的外观。请尽可能讨论。谢谢
您应该使用适合您要求的端点。您将阅读一本关于WCF的好书,以找出各种终点的好处和缺点。
例如,互操作性可能是必需的。然后基本HTTP或WS-HTTP可能适合。也许安全性是一项要求,那么WS fdedation绑定可能是有用的。也许您的要求是性能,并且您可以保证在同一台机器上,然后可能是命名的管道绑定。
除了"阅读一本好书"之外,没有任何结论性的答案。