2

httpバインディングで正常に実行されていたWCFサービスがあります。SSL を使用するようにこれを更新しようとしましたが、次のエラーが発生します。

「バインディング WSHttpBinding を持つエンドポイントのスキーム http に一致するベース アドレスが見つかりませんでした。登録されているベース アドレス スキームは [https] です。」

これは、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" />

私はあらゆる種類のことを試しましたが、何も得られないようです。どんな助けも大歓迎です!

4

2 に答える 2

1

バインディング構成設定の変更に加えて(Ladislavが述べたように)...ベースアドレスのHTTPをHTTPSに変更します。

于 2011-03-10T10:32:57.860 に答える