关于wcf中不同类型的端点

时间:2014-02-07 08:51:08

标签: wcf wcf-endpoint

我是wcf的新手,很想在wcf的各个部分进行探索。我得到了这个网址 http://msdn.microsoft.com/en-us/library/ee358762%28v=vs.110%29.aspx

从这里我看到很多不同类型的终点存在,但我不知道那些并且从未使用它

<endpoint address="net.tcp://localhost:5555/Calculator" binding="netTcpBinding"
contract="CalculatorInterFace.ICalculator" name="NetTcpBinding_ICalculator" />

我了解端点是否有服务地址网址和合同名称&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.

那么我怎么知道我应该使用哪个端点以及何时使用?我怎么知道不同类型端点的语法如何。请尽可能多地讨论。感谢

1 个答案:

答案 0 :(得分:0)

您应该使用符合您要求的端点。您将需要阅读一本关于WCF的好书,以找出各种端点的优点和缺点。

例如,互操作性可能是必需的。然后Basic-Http或Ws-Http可能适合。也许安全性是必需的,然后Ws Fderation绑定可能是有用的。也许你的要求是性能,你保证在同一台机器上,然后它可能是一个命名管道绑定。

除了“读一本关于它的好书”之外,没有确定的答案。