Можно ли применить https на WsDuallHttpBinding в WCF?

Я обнаружил, что WCF WsDualHttpBinding принимает http, однако https не допускается. Я получил следующие ошибки, если https используется:

System.ArgumentException: The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: context.ListenUriBaseAddress
at System.ServiceModel.Channels.TransportChannelListener..ctor(TransportBindingElement bindingElement, BindingContext context, MessageEncoderFactory defaultMessageEncoderFactory, HostNameComparisonMode hostNameComparisonMode)
at System.ServiceModel.Channels.HttpChannelListener..ctor(HttpTransportBindingElement bindingElement, BindingContext context)
at System.ServiceModel.Channels.HttpChannelListener`1..ctor(HttpTransportBindingElement bindingElement, BindingContext context)

Моя среда - Win7 pro, .net 4.0, VS2013 pro.

Здесь прикреплены мои настройки:

<wsDualHttpBinding>
  <binding name="customWsDualHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
    <readerQuotas maxDepth="2147483647" maxArrayLength="2147483647"
                    maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    <security mode="Message">
        <message clientCredentialType="Certificate" />
    </security>
  </binding>
</wsDualHttpBinding>

<service name="Reporting.DuplexService" behaviorConfiguration="customBehavior">
    <endpoint address="http://localhost:8123/Reporting/Duplex"
              binding="wsDualHttpBinding" bindingConfiguration="customWsDualHttpBinding"
              contract="WcfServices.Interfaces.IDuplexReportingService"/>
</service>

Когда я помещаю информацию serviceCertificate в элемент customBehavior, вышеуказанный сервис работает, однако он все еще использует http в качестве транспортного канала, хотя сообщение зашифровано сертификатом.

Можно ли использовать https в этом сценарии? заранее спасибо.

С уважением

0 ответов

Другие вопросы по тегам