Azure AppFabric: The token provider was unable to provide a security token. Error:Code:401

by Euo 17. August 2010 19:02

You will get the following error when creating Message Buffer possibly because the Issuer Name is not properly configured in your Service Bus namespace. 

 

{"The token provider was unable to provide a security token. Error:Code:401:SubCode:T2001:Detail:The issuer does not exist, or the secret or signature is invalid."}
    [System.IdentityModel.Tokens.SecurityTokenException]: {"The token provider was unable to provide a security token. Error:Code:401:SubCode:T2001:Detail:The issuer does not exist, or the secret or signature is invalid."}
    Data: {System.Collections.ListDictionaryInternal}
    HelpLink: null
    InnerException: {"The remote server returned an error: (401) Unauthorized."}
    Message: "The token provider was unable to provide a security token. Error:Code:401:SubCode:T2001:Detail:The issuer does not exist, or the secret or signature is invalid."
    Source: "Microsoft.ServiceBus"
    StackTrace: "   at Microsoft.ServiceBus.TokenProvider.ThrowException(String message, Exception innerException)\r\n   at Microsoft.ServiceBus.TokenProvider.GetAccessTokenCore(String appliesTo, String requestToken, String simpleAuthAssertionFormat, TimeSpan timeout, String& expiresIn)\r\n   at Microsoft.ServiceBus.TokenProvider.GetHttpAuthAccessTokenByAssertion(String appliesTo, String requestToken, String simpleAuthAssertionFormat, TimeSpan timeout)\r\n   at Microsoft.ServiceBus.SharedSecretTokenProvider.OnGetHttpAuthToken(String appliesTo, String action, TimeSpan timeout)\r\n   at Microsoft.ServiceBus.TokenProvider.GetHttpAuthToken(String appliesTo, String action, TimeSpan timeout)\r\n   at Microsoft.ServiceBus.HttpBufferClient.AddTokenToRequest(HttpWebRequest webRequest, TransportClientEndpointBehavior credential, String action)\r\n   at Microsoft.ServiceBus.HttpBufferClient.PutMessageBuffer(MessageBufferPolicy messageBufferPolicy)\r\n   at Microsoft.ServiceBus.HttpBufferClient.CreateMessageBuffer(Transpo
rtClientEndpointBehavior credential, Uri messageBufferUri, MessageBufferPolicy messageBufferPolicy)\r\n   at Microsoft.ServiceBus.MessageBufferClient.CreateMessageBuffer(TransportClientEndpointBehavior credential, Uri messageBufferUri, MessageBufferPolicy messageBufferPolicy, MessageVersion messageVersion)\r\n   at Microsoft.ServiceBus.MessageBufferClient.CreateMessageBuffer(TransportClientEndpointBehavior credential, Uri messageBufferUri, MessageBufferPolicy messageBufferPolicy)\r\n

 

Make sure the Issuer Name that was configured from the Azure Dashboard is exactly the same in your code.

Tags:

Azure

About the author

Something about the author

Month List

Page List