WCFサービスを構成するのに問題があります。私の要件は、basicHttpBindingエンドポイントとnetTcpBindingエンドポイントを公開することです。一部のクライアントは.NET2.0であり、WSDL.exeを介してプロキシを生成できる必要があります。
ほとんどの部分で機能しているようですが、WSDLを取得しようとすると、連携していません。ブラウザでは、SOAP XMLタグが返されますが、完全なWSDLではありません。WSDL.exeは私に一連のエラーを与えます:
エラー:「http://1.2.3.4:9877/MyService/basicHttp?wsdl」の処理中にエラーが発生しました。
- ドキュメントは理解されましたが、処理できませんでした。
- WSDLドキュメントには、解決できなかったリンクが含まれています。
- 'http:// localhost:9877 / MyService / basicHttp?wsdl=wsdl0'のダウンロード中にエラーが発生しました。
- 基になる接続が閉じられました:リモートサーバーに接続できません。
これが私のホスト構成です。ここで何か間違っているものが飛び出しますか?
<system.serviceModel>
<services>
<service behaviorConfiguration="MyServiceBehavior" name="MyRunner">
<endpoint address="netTcp" binding="netTcpBinding" bindingConfiguration="" contract="IMyRunner">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="basicHttp" binding="basicHttpBinding" bindingConfiguration="" contract="IMyRunner">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" contract="IMetadataExchange" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:9876/MyService/netTcp" />
<add baseAddress="http://localhost:9877/MyService/basicHttp" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>