I have configured an Azure Service bus relay for allowing an application behind the firewall to open a WCF connection to allow third-parties to connect to it. The third-party in this case is a web api running on Azure that provides services for a mobile app.
This has worked fine for around a month now: the mobile app contacts Azure web api, which relays calls thru the service bus relay to an installation behind the firewall. But just this morning I started running into problems. The issue occurs when the application
attempts to open the service host.
(Note: running in debug mode Visual Studio 2015, .NET Framework 4.5.2).
The Service Host is configured here:
ServiceHost mobileService =null;...var azureBinding =newNetTcpRelayBinding();
azureBinding.MaxBufferSize*=10;
azureBinding.MaxBufferPoolSize*=10;
azureBinding.MaxReceivedMessageSize*=10;
mobileService.AddServiceEndpoint(typeof(IActMobileService),
azureBinding,ServiceBusEnvironment.CreateServiceUri("sb","<sbname>", uniqueAzureID)).EndpointBehaviors.Add(newTransportClientEndpointBehavior{TokenProvider=TokenProvider.CreateSharedAccessSignatureTokenProvider("RootManageSharedAccessKey","<privatekey>")});try{
mobileService.Open();// this is where the Exception occurs}catch(Exception ex){...}
The exception thrown is an AMQP exception. Exception thrown: 'Microsoft.ServiceBus.Messaging.Amqp.AmqpException' in Microsoft.ServiceBus.dll Exception thrown: 'System.ServiceModel.CommunicationException' in Microsoft.ServiceBus.dll An AMQP error occurred (condition='amqp:internal-error').
Here's the stack trace:
at Microsoft.ServiceBus.RelayedOnewayListener.RelayedOnewayAmqpListenerClient.AmqpRelayedConnection.Open(TimeSpan timeout) at Microsoft.ServiceBus.RelayedOnewayListener.RelayedOnewayAmqpListenerClient.GetOrCreateConnection(Uri via, TimeSpan timeout) at Microsoft.ServiceBus.RelayedOnewayListener.RelayedOnewayAmqpListenerClient.Connect(TimeSpan
timeout) at Microsoft.ServiceBus.RelayedOnewayTcpClient.EnsureConnected(TimeSpan timeout, Boolean isRetry) at Microsoft.ServiceBus.RelayedOnewayTcpClient.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at
Microsoft.ServiceBus.RelayedOnewayListener.OnOpen(TimeSpan timeout) at Microsoft.ServiceBus.Channels.RefcountedCommunicationObject.Open(TimeSpan timeout) at Microsoft.ServiceBus.RelayedOnewayChannelListener.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at Microsoft.ServiceBus.RelayedSocketListener.Open(TimeSpan timeout) at Microsoft.ServiceBus.Channels.BufferedConnectionListener.Open(TimeSpan timeout) at Microsoft.ServiceBus.SocketConnectionTransportManager.OnOpen(TimeSpan timeout) at Microsoft.ServiceBus.Channels.TransportManager.Open(TimeSpan
timeout, TransportChannelListener channelListener) at Microsoft.ServiceBus.Channels.TransportManagerContainer.Open(TimeSpan timeout, SelectTransportManagersCallback selectTransportManagerCallback) at Microsoft.ServiceBus.Channels.TransportChannelListener.OnOpen(TimeSpan
timeout) at Microsoft.ServiceBus.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout) at Microsoft.ServiceBus.SocketConnectionChannelListener`2.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan
timeout) at HostActEnterprise.StartApp.OpenTheHost() in C:\Users\tony.scannell\Source\Workspaces\ACTEnterprise\Development\Service\HostActEnterprise\StartApp.cs:line 403
I have tried getting diagnostics thru the Azure portal, but it reports nothing. I have Googled for this specific error and cannot find any resolution. Since I have done nothing different with the code since last week (when it worked fine!) I am at a loss as
to what is happening.