Endpoint https + http. Could not find a base address that matches scheme http for the endpoint with binding CustomBinding. RRS feed

  • Question

  • I have a wcf service that will be hosted on a server with https. When I try to add a https endpoint I get the error "Could not find a base address that matches scheme http for the endpoint with binding CustomBinding" when I run it on my local machine. What do I need to in my web.config (and maybe IIS) and is it possible to have both a http endpoint and a https endpoint? I have tried lots of things and right now the system.servicemodel part of my config file looks like this:

          <service name="CustomerSelectionExt.CustomerSelection">       
            <endpoint address="" binding="customBinding" bindingConfiguration="customBindingHTTP" contract="CustomerSelectionExt.ICustomerSelection" />
            <!--<endpoint address="" listenUri="" binding="customBinding" bindingConfiguration="customBindingHTTPS" contract="CustomerSelectionExt.ICustomerSelection" />-->       
            <binding name="customBindingHTTP">
              <binaryMessageEncoding />         
              <httpTransport transferMode="Buffered"/>         
            <binding name="customBindingHTTPS">
              <binaryMessageEncoding />
              <httpsTransport transferMode="Buffered" />
            <behavior name="webHttp">
              <webHttp />
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>         
              <serviceDebug includeExceptionDetailInFaults="true"/>
            <add binding="basicHttpsBinding" scheme="https" />
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

    Greatful if anyone can help me

    • Moved by BonnieBMVP, Moderator Friday, December 13, 2013 3:07 PM Moved from C# to a more appropriate forum
    Friday, December 13, 2013 1:55 PM


  • Hi,

    Yes, we can configure the wcf service to use the both Http and Https.

    Here is an example about the webHttpbinding, please try to check it:

    #Configuring WCF services to work with both HTTP and HTTPS : .

    And for your question, please try to first add the following to see if it helps:

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>

    Then if the above can not help, please try to enable the WCF tracing to find the cause.

    #How to enable the WCF tracing: .

    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.

    Monday, December 16, 2013 8:34 AM

All replies