2
votes

It seems like the solution to my problem should be easier than it is, which makes me think I'm missing the obvious. I'm trying to test and ensure that a remote client machine can send/receive messages from an Azure Service Bus Queue.

I'm using the sample application provided by Microsoft at https://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-amqp/

The sample application works perfectly fine as long as all ports are open. However, I need the solution to work when only ports 80/443 are available. If I configure Windows Firewall to only allow inbound/outbound traffic on 80/443 it doesn't work. I receive the error "An attempt was made to access a socket in a way forbidden by its access permissions".

The offending line from the sample application is:

sender = factory.CreateMessageSender(entityName);

I've looked at an extraordinary number of sites and one of the suggestions I've found was to set the connectivity mode to Http such as this:

ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;

That doesn't work either.

I'm not trying to setup custom services on either the remote client or Azure hosted roles. I just need them to both be able to send/receive messages via Azure's Service Bus Queues and Topics.

Can anyone point out my flaw?

2
I found the answer to why it's not working in my case. The preview library for AMQP in Azure uses a different port then all other documentation I can find. Using the release library it works over https automatically. I'll leave the question open for anyone who can find a way to get the new preview library using AMQP to work. – jaryd

2 Answers

1
votes

From my comment above...

I found the answer to why it's not working in my case. The preview library for AMQP in Azure uses a different port then all other documentation I can find. Using the release library it works over https automatically.

0
votes

Http Connectivity mode doesnt work for Http 1.0. It will work only on Http 1.1...

If you are in Http 1.0 (mostly proxy) you have to open TCP ports (9350-54)