概要

NetTcpBinding

実装

IIS では、TCP と HTTP 両方サポートしますが、Visual Studio の開発サーバー(IIS)では、HTTP/HTTPS に限定され、NetTcpBinding をサポートしません。NetTcpBinding をホストするために、カーソルアプリケーションなどの別の方法でホストする必要があります。

サービス参照の追加を行うため、エンドポイントのメタデータが必要となりますので、メタデータを取得するためのエンドポイントを設定する必要があります。

 <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />

ただし、NetTcpBinding は「Net.tcp」プロトコルを利用するので、「serviceMetadata」の「httpGetEnabled」の値を「false」に設定する必要があります。

 <serviceMetadata httpGetEnabled="false" />

例:

<behaviors>
  <serviceBehaviors>
    <behavior name="MyServiceBehavior">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>

<services>
  <service name="Samples1.MyService" behaviorConfiguration="MyServiceBehavior">

    <endpoint address="" binding="netTcpBinding" contract="Samples1.IMyService">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>

    <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />

    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:9999/Service1" />
      </baseAddresses>
    </host>

  </service>
</services>

セキュリティ

EndpointSecurity ModeセキュリティプロパティclientCredentialType詳細
NET.TCPTransportTransportWindowsユーザー名 パスワード(ドメイン名があっても、なくてもよい
SSPI プロトコルによる認証
messageTransportWindowsユーザー名 パスワード(ドメイン名があっても、なくてもよい
SOAP メッセージ交換の Credential による認証


本当にほしかったのはこういうブログだったんだ

コメント:



(画像の文字列を入力して下さい)

トップ   編集 凍結 差分 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019/12/02 (月) 12:44:02 (1628d)

yVoC[UNLIMITȂ1~] ECirŃ|C Yahoo yV LINEf[^[Ōz500~`I


z[y[W ̃NWbgJ[h COiq 萔O~ył񂫁z COsیI COze