2011-06-20 6 views
0

私は単純なWCFサービスを構築しています。私のweb.configファイルは以下の通りです:WCFサービスサポートされていないMIMEタイプの問題

私はそれが次のエラーメッセージ提示サービスを消費しようとしています
<?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> 

コンテンツタイプアプリケーション/石鹸+ xmlのを。 charset = utf-8はサービスhttp://companyserver/wcftest/Service1.svcでサポートされていませんでした。クライアントとサービスのバインドが一致していない可能性があります。

+1

サービスをどのように使用しますか?例外として、クライアントはSOAP 1.2で要求を送信しますが、サービスではSOAP 1.1が必要です –

答えて

0

クライアントとサービスのバインド設定を確認してください。そこには矛盾がなければなりません。たとえば、クライアントとサーバーの両方で同じセキュリティモデルを使用していますか?

関連する問題