title: Service Bus queue token issue
body: <p>I am getting this error when i am giving the key for creating the queue </p>
  
  <blockquote>
    <p>System.UnauthorizedAccessException was unhandled   Message=The token
    provider was unable to provide a security token while accessing
    '<a href="https://sharan-sb.accesscontrol.windows.net/WRAPv0.9/" rel="nofollow">https://sharan-sb.accesscontrol.windows.net/WRAPv0.9/</a>'. Token
    provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009:
    SWT token is
    invalid.:TraceID:afb424d9-d69c-4460-90d4-23ddd49ad950:TimeStamp:2013-07-23
    16:08:29Z'.   Source=Microsoft.ServiceBus   StackTrace:
        Server stack trace: 
           at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider
    tokenProvider, String appliesTo, String action, Boolean bypassCache,
    TimeSpan timeout)
           at Microsoft.ServiceBus.Messaging.HttpWebRequestExtensions.AddAuthorizationHeader(HttpWebRequest
    request, ITokenProvider tokenProvider, String action)
           at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.CreateAsyncResult<code>1.&lt;GetAsyncSteps&gt;d__2.MoveNext()
           at Microsoft.ServiceBus.Messaging.IteratorAsyncResult</code>1.MoveNextStep()
           at Microsoft.ServiceBus.Messaging.IteratorAsyncResult<code>1.EnumerateSteps(CurrentThreadType
    state)
           at Microsoft.ServiceBus.Messaging.IteratorAsyncResult</code>1.Start()
        Exception rethrown at [0]: 
           at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult
    result)
           at Microsoft.ServiceBus.Messaging.IteratorAsyncResult<code>1.End(IAsyncResult
    asyncResult)
           at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.EndCreate[T](IAsyncResult
    asyncResult)
           at Microsoft.ServiceBus.NamespaceManager.CreateQueueAsyncResult.CreateDescription(CreateQueueAsyncResult
    thisPtr, IAsyncResult r)
           at Microsoft.ServiceBus.NamespaceManager.CreateQueueAsyncResult.&lt;GetAsyncSteps&gt;b__a(CreateQueueAsyncResult
    thisPtr, IAsyncResult r)
           at Microsoft.ServiceBus.Messaging.IteratorAsyncResult</code>1.EnumerateSteps(CurrentThreadType
    state)
        Exception rethrown at [1]: 
           at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult
    result)
           at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.End(IAsyncResult
    asyncResult)
           at Microsoft.ServiceBus.NamespaceManager.OnEndCreateQueue(IAsyncResult
    result)
           at Microsoft.ServiceBus.NamespaceManager.EndCreateQueue(IAsyncResult
    result)
           at Microsoft.ServiceBus.NamespaceManager.CreateQueue(QueueDescription
    description)
           at BasicQueueDemo.Program.Main(String[] args) in D:\Azure\PluralSight\Azure Videos\9-Windows Azure Service
    Bus\materials\demos\after\BasicQueueDemo\BasicQueueDemo\Program.cs:line
    20
           at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean
    ignoreSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()   InnerException: System.IdentityModel.Tokens.SecurityTokenException
           Message=The token provider was unable to provide a security token while accessing
    '<a href="https://sharan-sb.accesscontrol.windows.net/WRAPv0.9/" rel="nofollow">https://sharan-sb.accesscontrol.windows.net/WRAPv0.9/</a>'. Token
    provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009:
    SWT token is
    invalid.:TraceID:afb424d9-d69c-4460-90d4-23ddd49ad950:TimeStamp:2013-07-23
    16:08:29Z'.
           Source=Microsoft.ServiceBus
           StackTrace:
                at Microsoft.ServiceBus.TokenProviderHelper.ThrowException(Uri
    requestUri, WebException exception)
                at Microsoft.ServiceBus.TokenProviderHelper.GetAccessTokenCore(Uri
    requestUri, String appliesTo, String requestToken, String
    simpleAuthAssertionFormat, TimeSpan timeout, String&amp; expiresIn)
                at Microsoft.ServiceBus.TokenProviderHelper.GetHttpAuthAccessTokenByAssertion(Uri
    requestUri, String appliesTo, String requestToken, String
    simpleAuthAssertionFormat, TimeSpan timeout)
                at Microsoft.ServiceBus.SharedSecretTokenProvider.OnBeginGetWebToken(String
    appliesTo, String action, TimeSpan timeout, AsyncCallback callback,
    Object state)
                at Microsoft.ServiceBus.TokenProvider.GetWebTokenAsyncResult..ctor(TokenProvider
    tokenProvider, String appliesTo, String action, Boolean bypassCache,
    TimeSpan timeout, AsyncCallback callback, Object state)
                at Microsoft.ServiceBus.TokenProvider.BeginGetWebToken(String appliesTo,
    String action, Boolean bypassCache, TimeSpan timeout, AsyncCallback
    callback, Object state)
                at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider
    tokenProvider, String appliesTo, String action, Boolean bypassCache,
    TimeSpan timeout)
           InnerException: System.Net.WebException
                Message=The remote server returned an error: (401) Unauthorized.
                Source=System
                StackTrace:
                     at System.Net.HttpWebRequest.GetResponse()
                     at Microsoft.ServiceBus.TokenProviderHelper.GetAccessTokenCore(Uri
    requestUri, String appliesTo, String requestToken, String
    simpleAuthAssertionFormat, TimeSpan timeout, String&amp; expiresIn)
                InnerException:</p>
  </blockquote>