I have a WCF service which I'm consuming using an azure service bus relay. I'm trying to expose the mex endpoint but I'm encountering this error
Could not find a base address that matches scheme sb for the endpoint with binding NetTcpRelayBinding. Registered base address schemes are [http].
My config file looks like this, what am I doing wrong here?
<system.serviceModel>
<bindings>
<netTcpRelayBinding>
<binding name="default">
<security mode="None" />
</binding>
</netTcpRelayBinding>
</bindings>
<extensions>
<behaviorExtensions>
<add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</behaviorExtensions>
<bindingExtensions>
<!--<add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
<add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>
</extensions>
<services>
<service behaviorConfiguration="serviceMetadata" name="Namespace.TestService">
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<endpoint address="sb://[my namespace].servicebus.windows.net/Test" behaviorConfiguration="sbTokenProvider" binding="netTcpRelayBinding" bindingConfiguration="default" contract="Namespace.ITestContract" />
<endpoint name="MexEndpoint" contract="IMetadataExchange" binding="netTcpRelayBinding" bindingConfiguration="default" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceMetadata">
<serviceMetadata />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="sbTokenProvider">
<transportClientEndpointBehavior>
<tokenProvider>
<sharedAccessSignature keyName="RootManageSharedAccessKey" key="[key]" />
</tokenProvider>
</transportClientEndpointBehavior>
<serviceRegistrySettings discoveryMode="Public" />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>