0

私は wcf が初めてで、wcf のさまざまな部分を探索することに興味があります。この URL を取得しました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" />

エンドポイントについては、サービスアドレスのURLとコントラクト名とエンドポイント名がこれだけあることを理解しています。

ここにすべての異なる種類のエンドポイントがあります

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.

では、どのエンドポイントをいつ使用する必要があるかを知るにはどうすればよいでしょうか? また、さまざまなタイプのエンドポイントの構文がどのように見えるかを知るにはどうすればよいでしょうか。できるだけ相談してください。ありがとう

4

1 に答える 1

0

要件に合ったエンドポイントを使用する必要があります。さまざまなエンドポイントの利点と欠点を知るには、WCF に関する優れた本を読む必要があります。

たとえば、相互運用性が要件になる場合があります。次に、Basic-Http または Ws-Http がおそらく適合します。セキュリティが必要な場合は、Ws Fderation バインディングが役立つ場合があります。おそらく、要件はパフォーマンスであり、同じマシン上にいることが保証されている場合は、おそらく名前付きパイプバインディングです。

これに対する決定的な答えは、「それについての良い本を読む」以外にありません。

于 2014-02-07T08:58:18.430 に答える