I can't access Azure Service Bus Queue from Azure Website once deployed to the cloud. While running on localhost, if works fine, I can send a message to the queue, but if I deploy the application, on the remote server I am getting an exception while creating QueueClient:
"The socket connection was aborted because an asynchronous send to the socket did not complete within the allotted timeout of 00:00:59.4820817. The time allotted to this operation may have been a portion of a longer timeout."
I am using QueueClient.CreateFromConnectionString(connectionString) method. The debugger shows that everything is fine with the connectionString variable.
The connection string is:
Endpoint=sb://[removed].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[removed]
I have tried to set "Copy Local = True" to all references without success. I am using WindowsAzure.ServiceBus 2.6.4 nuget.
Also, the exception is not raised on NamespaceManager.QueueExists(name) if the queue exists, but exception is raised on NamespaceManager.CreateQueue(name) if it does not exist.
Anyone has experienced such problem? Thanks in advance for any tips.
UPDATE 1:
For clarification, I am providing the block of code and the trace output:
System.Diagnostics.Trace.TraceError("BEGIN");
var queueClient = QueueClient.CreateFromConnectionString(this.configuration.ServiceBusConnectionString, "points");
System.Diagnostics.Trace.TraceError(this.configuration.ServiceBusConnectionString);
queueClient.Send(new BrokeredMessage());
System.Diagnostics.Trace.TraceError("END");
Produces the output:
Connecting to Application logs ...
2015-03-29T01:40:29 Welcome, you are now connected to log-streaming service.
Application: 2015-03-29T01:40:41 PID[1952] Error BEGIN
Application: 2015-03-29T01:40:44 PID[1952] Error Endpoint=sb://[removed-before-posting].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[removed-before-posting]
Application: 2015-03-29T01:41:48 PID[1952] Error The socket connection was aborted because an asynchronous send to the socket did not complete within the allotted timeout of 00:00:59.5586593. The time allotted to this operation may have been a portion of a longer timeout.
UPDATE 2
There are no connectivity issues while using Azure Storage API or SQL server.
UPDATE 3
Both, website instance and service bus namespace are created in North Europe region.