私は単純な WCF サービスを構築しています。私のweb.configは次のとおりです。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MyBasicHttpBinding">
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<!-- This section is optional with the default configuration
model introduced in .NET Framework 4 -->
<service name="WcfService1.Service1" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint address="http://companyserver/wcftest/service1.svc"
binding="basicHttpBinding"
bindingConfiguration="MyBasicHttpBinding"
contract="WcfService1.IService1" />
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
サービスを利用しようとすると、次のエラー メッセージが表示されます。
コンテンツ タイプ application/soap+xml; charset=utf-8 は、サービスhttp://companyserver/wcftest/Service1.svcではサポートされていませんでした。クライアントとサービスのバインディングが一致していない可能性があります。