0

As per I know Azure Service bus uses port 9350, 9353 etc. to send messages. In my organization because of firewall policy we can't open these ports. So whenever I try to send messages to my queue in Azure I get error saying

No DNS entries exist for host mycloudsevice.servicebus.windows.net".

Is there a way I can send these over port 80/443, as they are always open?

Let me know if any examples or code changes I can do.

crthompson
  • 15,653
  • 6
  • 58
  • 80
rajcool111
  • 657
  • 4
  • 14
  • 36
  • the answer of Rob is totally right. but the issues is indeed DNS related. seems Microsoft has DNS issues today - might be related to that ? – Sam Vanhoutte Nov 21 '13 at 23:21
  • When I send messages out side of my work network it works fine. Not sure if firewall is blocking it. – rajcool111 Nov 22 '13 at 15:14

1 Answers1

2

You can force the Service Bus library to use HTTP by declaring the following:

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;

However it looks like you have a DNS problem not a TCP port problem, you might want to check that you have entered your service bus namespace correctly.

Rob
  • 4,733
  • 3
  • 32
  • 29
  • When I send messages out side of my work network it works fine. Not sure if firewall is blocking it. If I have to send it though http, where shall I use your code? Is it before creating namespace manager or before creating queue client? Also, how I can do it for https? – rajcool111 Nov 22 '13 at 15:18
  • you have to set that static property before you open your service host (when hosting a service), or before you send your message to the service. – Sam Vanhoutte Nov 22 '13 at 17:15
  • I tried that and worked when setting it up on http, though its deadly slow and not sure if reliable for large volume of messages. – rajcool111 Nov 22 '13 at 20:34
  • It is definately slow, but as reliable as any other Http. Regardless of if you use Http or Tcp you should add some transient error handling if you are concerned about reliability. – Rob Nov 22 '13 at 21:56