次のWCFエンドポイント構成があります。
<service behaviorConfiguration="MyNamespace.ContainerManagementServiceBehavior"
name="MyNamespace.ContainerManagementService">
<endpoint address="" binding="basicHttpBinding"
name="ContainerManagementbasicHttpEndpoint" contract="MyNamespace.IContainer"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<behaviors>
<behavior name="MyNamespace.ContainerManagementServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</behaviors>
これが私のクライアント構成です:
<client>
<endpoint address="http://localhost:3227/Services/ContainerManagementService.svc"
binding="basicHttpBinding"
contract="MyNamespace2.IAQSIDMService" name="externalService" />
</client>
私は動的にWebサービス呼び出しを行っており、別のアドレスを提供しています。
var svc = new AQSIDMServiceClient(Constants.External_Service_ConfigurationName, serviceAddress);
エンドポイントを呼び出すと、次のエラーメッセージが表示されます。
{"EndpointDispatcherでのContractFilterの不一致が原因で、アクション'http:// IMyService / CreateContainer'のメッセージを受信者で処理できません。これは、コントラクトの不一致(送信者と受信者の間のアクションの不一致)または送信者と受信者の間のバインディング/セキュリティの不一致。送信者と受信者が同じコントラクトと同じバインディング(メッセージ、トランスポート、なしなどのセキュリティ要件を含む)を持っていることを確認してください。 "}
これは、クライアントがエンドポイントと同じserviceBehaviorを持っていないという事実が原因でしょうか?私が見逃している可能性のあるものは他にありますか?
ありがとう!