次のような構成でWCFサービスを作成しました。
<!-- This is the binding for SSL-->
<wsHttpBinding>
<binding name="SSLBinding">
<security mode="Transport" >
<transport clientCredentialType="None" ></transport>
</security>
</binding>
</wsHttpBinding>
<!-- SSL Binding Ends here.-->
</bindings>
<behaviors>
<serviceBehaviors>
<!-- This is the behavior we have defined for SSL configuration-->
<behavior name="SSLBehavior">
<serviceMetadata httpsGetEnabled="True"/>
</behavior>
<!-- SSL Behavior Ends here -->
</serviceBehaviors>
</behaviors>
<services>
<!-- Service configured alongwith its Mex Endpoint-->
<service name="CalculatorService.Service1" behaviorConfiguration="SSLBehavior">
<endpoint contract="CalculatorService.IService1" name="SSLAddress" binding="wsHttpBinding" bindingConfiguration="SSLBinding"></endpoint>
<endpoint name="mex" binding="mexHttpsBinding" contract="IMetadataExchange"></endpoint>
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
次のチュートリアルを使用して、IIS5.1のWCFサービスでSSLをホストしました http://www.codeproject.com/Articles/36705/7-simple-steps-to-enable-HTTPS-on-WCF-WsHttp-bindi
私は次のようにエラーを取得しています
A binding instance has already been associated to listen URI
'https://wd-xpa7kyy12d3.XXXX.com/CalculatorService/Service1.svc'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.
「SSLAddress」という名前のエンドポイントで、「address」を「https://wd-xpa7kyy12d3.XXXX.com/CalculatorService/Service1.svc」として追加しましたが、このURLでサービス参照を追加できなかったため、WSDLを具体的に指定する必要がありました道。
WSDLパスを提供し、コンソールアプリケーションにサービス参照を正常に追加した後でも、クライアントプロキシがメソッドを実行しているときに、エラーが発生していました。そこで、エンドポイントからアドレス属性を削除しましたが、この問題が発生しています。現在の構成の何が問題になっているのかわかりませんか?手伝ってくれてありがとう。