locked
The Dreaded 'Could not find a base address that matches scheme' RRS feed

  • Question

  • Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https].

    Oh yes I'm getting that lovely error message and I'm clueless to the problem. I've got a svc buried in a virtual site hanging off the default site of the server;

    DefaultSite\MySite\Services\MyService.svc

    Works fine with http. However, when I change the default site over to requiring https I get the above error. The only other thing I did was change the SL reference to add the Transport security mode and change the endpoint address config to:

    <system.serviceModel>

    <bindings>

    <basicHttpBinding>

    <binding name="BasicHttpBinding_MyService" maxBufferSize="2147483647"

    maxReceivedMessageSize="2147483647">

    <security mode="Transport" />

    </binding>

    </basicHttpBinding>

    </bindings>

    <client>

    <endpoint address=https://DefaultSite/Services/MyService.svc

    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_MyService"

    contract="MyServices.MyService" name="BasicHttpBinding_MyService" />

    </client>

    </system.serviceModel>

    I've made zero changes to the web config hosting the service. The SL client works out the address based upon the hosts uri and it is correctly using https. So what else do I need to do or check? I can't figure out what is trying to use http to cause the conflict - if that is the problem. 

     

    Thursday, August 13, 2009 10:15 AM

Answers

  • Hi thanks for the reply. However it now seems to be working!? The problem was with the service itself, rather than anything SL related. Essentially I took it all the way back to the standard non-SSL settings and slowly put everything back and it worked first time. No idea what I did differently so I can only say just try it again if it's happened to you (sure it's something in IIS since there are a number of virtual sites in the path).
    Thursday, August 13, 2009 5:11 PM

All replies

  • Is DefaultSite the name of the machine you are hosting the service on? The address you have in the web.config seems to suggest so: https://DefaultSite/...

    I'd suggest trying to specify the address attribute on the endpoint element to be empty "", and then trying to access the *.svc file with your browser to see if it started successfuly.

    Thursday, August 13, 2009 4:29 PM
  • Hi thanks for the reply. However it now seems to be working!? The problem was with the service itself, rather than anything SL related. Essentially I took it all the way back to the standard non-SSL settings and slowly put everything back and it worked first time. No idea what I did differently so I can only say just try it again if it's happened to you (sure it's something in IIS since there are a number of virtual sites in the path).
    Thursday, August 13, 2009 5:11 PM
  • This is just more information about what causes this error:

    http://ozkary.blogspot.com/2011/06/wcf-could-not-find-base-address-that.html

     

    I hope it helps.

    Wednesday, June 22, 2011 6:05 PM