0

I am trying to make a WCF application that listens to Service Bus. The following snippet for defining the service in Web.config works when multipleSiteBindingsEnabled is set to false:

  <service behaviorConfiguration="MyServiceTypeBehavior"
    name="WcfService3.Service1">
    <endpoint address="https://namespace.servicebus.windows.net/WebHttpService"
    behaviorConfiguration="sharedSecretClientCredentials"
    binding="webHttpRelayBinding"
    bindingConfiguration="WebHttpRelayEndpointConfig"
    name="RelayEndpoint"
    contract="WcfService3.IService1"/>
  </service>

When multipleSiteBindingsEnabled is set to true, I changed the config to the following:

  <service behaviorConfiguration="MyServiceTypeBehavior"
    name="WcfService3.Service1">
    <host>
      <baseAddresses>
        <add baseAddress="https://namespace.servicebus.windows.net/" />
      </baseAddresses>
    </host>
    <endpoint address="WebHttpService"
    behaviorConfiguration="sharedSecretClientCredentials"
    binding="webHttpRelayBinding"
    bindingConfiguration="WebHttpRelayEndpointConfig"
    name="RelayEndpoint"
    contract="WcfService3.IService1"/>
  </service>

This results in the following error: Could not find a base address that matches scheme https for the endpoint with binding WebHttpRelayBinding. Registered base address schemes are [http].

Is there anything else I need to declare for the service in order for it to register https as the scheme? Note that I do have the security mode for the binding as transport.

TheDude
  • 3,796
  • 2
  • 28
  • 51

1 Answers1

1

Having multipleSiteBindingsEnabled set to true is going to be incompatible with using relayed endpoints. This is because the relayed endpoints require an absolute address on the endpoint configuration (the service bus relay endpoint), while multipleSiteBindingsEnabled needs endpoints with relative addresses to work.

What are you trying to accomplish by setting the multipleSiteBindingsEnabled to true?

Ramiro Berrelleza
  • 2,254
  • 1
  • 15
  • 27
  • I was attempting to add another endpoint for mex (removed it from the config above). Is there a way to expose that as well? – TheDude Jan 10 '13 at 18:29
  • You should be able to, this code has an example of how to expose the MEX endpoint via SB: http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_servicebusadvancedconfigurations.aspx – Ramiro Berrelleza Jan 10 '13 at 23:15