2011-03-10 11 views
2

httpバインディングで正常に動作していたWCFサービスがあります。 SSLを使用するように更新しようとしましたが、次のエラーが表示されます。SSLを要求するようにWCFサービスを変更する

"バインディングWSHttpBindingを持つエンドポイントのスキームhttpに一致するベースアドレスを見つけることができませんでした。

これは、このチェックボックスをオフにすると、IIS 7.5で「SSLを要求」に設定した場合にのみ発生します。

は、ここに私の設定

<system.serviceModel>  
<behaviors> 
    <serviceBehaviors> 
    <behavior name="ServiceBehavior" > 
     <dataContractSerializer maxItemsInObjectGraph="2147483646"/> 
     <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> 
     <serviceDebug includeExceptionDetailInFaults="false" /> 
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 
<bindings> 
    <wsHttpBinding> 
    <binding name="wsHttpEndpointBinding"> 
    </binding> 
    </wsHttpBinding> 
</bindings> 
<services> 
    <service behaviorConfiguration="ServiceBehavior" name="WcfService1.Service1"> 
    <host> 
     <baseAddresses> 
     <add baseAddress="http://localhost/WcfService1/"/> 
     </baseAddresses> 
    </host> 
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="" 
     name="wsHttpEndpoint" contract="WcfService1.IService1" /> 
    <endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration="" 
     name="MexHttpsBindingEndpoint" contract="IMetadataExchange" /> 
    </service> 
</services> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 

私が試したallsortsと何が私を得るように思われる、任意のヘルプは大歓迎ですよ!

<bindings> 
    <wsHttpBinding> 
    <binding name="wsHttpEndpointBinding"> 
     <security mode="Transport" /> 
    </binding> 
    </wsHttpBinding> 
</bindings> 

と参照という設定の名前にそのbindingConfiguration属性を設定することによって、あなたのendpointでの構成:

答えて

1

はあなたのバインディング設定を変更します。

<endpoint address="" binding="wsHttpBinding" 
    bindingConfiguration="wsHttpEndpointBinding" 
    name="wsHttpEndpoint" contract="WcfService1.IService1" /> 

IISでホストする場合、それが使用されていないので、あなたは、ベースアドレスを持つhostセクションを削除することができます。

+0

私はあなたのお勧めに続き、サービスは現在httpsで動作しています!ご助力ありがとうございます! – WillMcKill

1

バインディング設定の変更(Ladislavの説明どおり)...ベースアドレスのHTTPをHTTPSに変更します。

+0

お返事ありがとうございます。私はベースアドレスをhttps ''に変更しても、同じエラーが発生します。 – WillMcKill

+0

匿名化後にフルバインディングを投稿できますか? – Aliostad

関連する問題