Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

How to set RelayClientAuthenticationType to "None"

$
0
0

I have a WCF Service and I have programmatically built a Service Bus Relay Endpoint like so:

Uri[] uriArray = { address, networkAddress };

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;

ServiceHost host = new ServiceHost(typeof(Retrieve),uriArray);

ServiceMetadataBehavior mBehave = new ServiceMetadataBehavior();
host.Description.Behaviors.Add(mBehave);

IEndpointBehavior serviceRegistrySettings = new ServiceRegistrySettings(DiscoveryType.Public);

foreach (ServiceEndpoint endpoint in host.Description.Endpoints)
    {
       endpoint.Behaviors.Add(serviceRegistrySettings);
       endpoint.Behaviors.Add(sasCredential);
    }

I'm new at this so the App.config ended up including this system.serviceModel section:

<system.serviceModel><services><service name="WindowsService.Retrieve"><endpoint contract="WindowsService.IRetrieve" binding="basicHttpRelayBinding"/></service></services><extensions><bindingExtensions><add name="basicHttpRelayBinding"
                   type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></bindingExtensions></extensions></system.serviceModel>

I just need to set the  RelayClientAuthenticationType toNone and it can be in the app.config or programmatically. I would like to learn both. Thanks!


John Donnelly





Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>