Visual C# 2013逆引き大全 555の極意

アプリケーション実行の極意 - Tips541 WCFでデータを送信する

Icon comment count 0
Icon stock count 0

Tips541WCFでデータを送信する

PointWindows Communication Foundationをサーバーとして提供(ServiceHostクラス、AddServiceEndpointメソッド)

Level3
対応
  • EXP
  • PRO

WCF(Windows Communication Foundation)は、プロセス間通信にも利用できます。

WCFサービスをIISで作成するほかにも、アプリケーションで独自にWCFサーバーを提供します。

WCFサーバーを作るためには、Service
Hostクラス
でシングルトンのオブジェクトを作成した後に、AddServiceEndpointメソッドでWCFサービスを提供するアドレス(URLとポート番号)を指定します。

サービスを提供するインターフェイスは、次のように記述します。

[ServiceContract]
pub

出典情報

Medium

Visual C# 2013逆引き大全 555の極意

  • 著者: 増田智明、池谷京子、国本温子

コメント

    コメントはありません