none
is it possible to apply https on WsDuallHttpBinding in WCF? RRS feed

  • Question

  • Hi All:

    I'm trying to use WsDualHttpBinding on https, however error is encountered as below:

    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)
    ... ...

    it looks like it's not happy with https, http is accepted only.

    My environment is Win7 pro, .net 4.0, VS2013 pro.

    here attached my settings:

    <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>

    When I put <serviceCertificate> in <customBehavior>, above service is working,

    however the "http" prefix still confuses me if it's safe enough, although the message is encrypted by certificate.

    is it possible to apply https on WsDuallHttpBinding in WCF?

    thanks in advance.

    kind regards




    fight for future!


    • Edited by Mulder2008 Friday, February 5, 2016 12:52 AM
    Thursday, February 4, 2016 6:21 AM

Answers

  • Hello,

    >>however the "http" prefix still confuses me if it's safe enough, although the message is encrypted by certificate.

    Only the client provides the correct certificate can access the service, so in my mind it is safe.

    >>is it possible to apply https on WsDuallHttpBinding in WCF?

    Based on this article, we can see that the wsDualHttpBinding does not support transport-level security, so in my mind it means that SSL/TLS encryption is not possible.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Mulder2008 Monday, February 8, 2016 5:14 AM
    Friday, February 5, 2016 2:39 PM
    Moderator

All replies

  • Hello,

    >>however the "http" prefix still confuses me if it's safe enough, although the message is encrypted by certificate.

    Only the client provides the correct certificate can access the service, so in my mind it is safe.

    >>is it possible to apply https on WsDuallHttpBinding in WCF?

    Based on this article, we can see that the wsDualHttpBinding does not support transport-level security, so in my mind it means that SSL/TLS encryption is not possible.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Mulder2008 Monday, February 8, 2016 5:14 AM
    Friday, February 5, 2016 2:39 PM
    Moderator
  • thanks for your reply.

    fight for future!

    Sunday, February 7, 2016 11:20 PM