ServiceBus unable to provide a security token
We have been using serviceBusses in azure for over a year and suddenly this happens. We have been stuck on this issue for 6 days now.
the code is
System.Net.ServicePointManager.DefaultConnectionLimit = int.Parse(Loader.Instance.SettingsForServer.SbDefaultConnectionLimit);
_serviceHost.AddServiceEndpoint(
typeof(IMessage),
tcpBinding,
new Uri("sb://infowell.servicebus.windows.net/" + Loader.Instance.CustomerLicense.Replace("-", "").ToLower())
).Behaviors.Add(new TransportClientEndpointBehavior { TokenProvider = TokenProvider.CreateSharedSecretTokenProvider(Loader.Instance.SettingsForServer.SbIssuerName, Loader.Instance.SettingsForServer.SbIssuerSecret) });
_serviceHost.Open();
and it failes with
The token provider was unable to provide a security token while accessing 'https://infowell-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'The request was aborted: The request was canceled.'.
and the stack trace is:
Exception rethrown at [0]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.TokenProviderHelper.EndGetAccessTokenCore(IAsyncResult result, String& expiresIn)
at Microsoft.ServiceBus.TokenProviderHelper.EndGetAccessTokenByAssertion(IAsyncResult result)
at Microsoft.ServiceBus.SharedSecretTokenProvider.OnEndGetToken(IAsyncResult result, DateTime& cacheUntil)
at Microsoft.ServiceBus.TokenProvider.GetTokenAsyncResult.OnEndTokenProviderCallback(IAsyncResult result, DateTime& cacheUntil)
at Microsoft.ServiceBus.TokenProvider.GetTokenAsyncResultBase`1.OnCompletion(IAsyncResult result)
at Microsoft.ServiceBus.TokenProvider.GetTokenAsyncResultBase`1.<GetAsyncSteps>b__f(T thisPtr, IAsyncResult r)
at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
Exception rethrown at [1]:
at Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
at Microsoft.ServiceBus.TokenProvider.EndGetToken(IAsyncResult result)
at Microsoft.ServiceBus.TokenProviderUtility.GetToken(TokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
at Microsoft.ServiceBus.RelayedOnewayTcpListener.RelayedOnewayTcpListenerClient.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.RelayedOnewayTcpListener.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.DemuxSocketManager.RegisterListener(TimeSpan timeout, DemuxSocketListener listener)
at Microsoft.ServiceBus.DemuxSocketListener.Open(TimeSpan timeout)
at Microsoft.ServiceBus.HybridConnectionListener.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.BufferedConnectionListener.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionAcceptor.Open(TimeSpan timeout)
at Microsoft.ServiceBus.Channels.ConnectionDemuxer.StartDemuxing(TimeSpan timeout, OnViaDelegate viaDelegate)
at Microsoft.ServiceBus.Channels.ConnectionDemuxer.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 System.ServiceModel.Channels.CommunicationObject.Open()
at OPC.Main.ServiceBusOpenChannel() in d:\src2013\...
There have been no codechanges and we are at loss what this could be.
Is there anyone there that could point us in the right direction? We have checked that the certificates are still valid.