I cannot get the echo sample to work at all since the Nov CTP update. Are there still issues? Note: setting CredentialType to Unauthenticated does not work either.
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.AutoDetect;
// create the service URI based on the solution name
Uri address = ServiceBusEnvironment.CreateServiceUri("sb", "<myservicenamespace>", "EchoService");
// create the credentials object for the endpoint
TransportClientEndpointBehavior sharedSecretServiceBusCredential = new TransportClientEndpointBehavior();
sharedSecretServiceBusCredential.CredentialType = TransportClientCredentialType.SharedSecret;
sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerName = "owner";
sharedSecretServiceBusCredential.Credentials.SharedSecret.IssuerSecret = "<my current management key>";
// create the service host reading the configuration
ServiceHost host = new ServiceHost(typeof(EchoService), address);
// create the ServiceRegistrySettings behavior for the endpoint
IEndpointBehavior serviceRegistrySettings = new ServiceRegistrySettings(DiscoveryType.Public);
// add the Service Bus credentials to all endpoints specified in configuration
foreach (ServiceEndpoint endpoint in host.Description.Endpoints)
{
endpoint.Behaviors.Add(serviceRegistrySettings);
endpoint.Behaviors.Add(sharedSecretServiceBusCredential);
}
// open the service
host.Open();