IIS でホストされている WCF .svc ファイルがあります。basicHTTP バインディングを使用したい。このサービス ジョブは、net.tcp を介して別のサービスを実際に呼び出すことです。ローカルではすべて正常に動作しますが、展開するとこのエラーが発生します。
指定された URI スキーム「http」は無効です。「net.tcp」が必要です。パラメータ名:経由
サーバー構成はこちら
<client>
<endpoint address="net.tcp://localhost:9300/InternalInterfaceService"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IInternalInterfaceService"
contract="IInternalInterfaceService" name="NetTcpBinding_IInternalInterfaceService">
<identity>
<servicePrincipalName value="localhost" />
</identity>
</endpoint>
</client>
<services>
<service name="MyExternalService">
<endpoint address="" binding="basicHttpBinding" contract="IMyExternalService" />
</service>
</services>
そして、これが svcutil が生成する構成です
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IMyExternalService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://myserver.somesdomain.com/Services/MyExternalService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyExternalService"
contract="IMyInternalService" name="BasicHttpBinding_IMyExternalService" />
</client>
</system.serviceModel>
これを正しく配線するにはどうすればよいですか。http 経由で InternalInterfaceService を公開したくありません。ここで間違っていることは何ですか? ヒントや提案は大歓迎です。
ありがとう、
~ck