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

Timeout Exception in Windows Azure Service Bus Relay

$
0
0

When creating the WCF binding with the Azure service bus I get the connection timeout exception when try to open the ServiceHost.

Below is my code

 var sh = new ServiceHost(typeof(ProblemSolver));


sh.AddServiceEndpoint(typeof(IProblemSolver), new NetTcpRelayBinding(),
                ServiceBusEnvironment.CreateServiceUri("sb","myservicebusnamespace", "problemsolver")).
                Behaviors.Add(new TransportClientEndpointBehavior
                {
                    TokenProvider = TokenProvider.CreateSharedSecretTokenProvider("owner", "mykey")
                });

            sh.Open();

            Console.WriteLine("Press ENTER to close");
            Console.ReadLine();

            sh.Close();


My blog : http://thuruinhttp.wordpress.com


Viewing all articles
Browse latest Browse all 1916

Trending Articles



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