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> セキュリティ †
セシウム137を97.7%吸着 コメント:
|