【发布时间】:2014-06-15 15:30:26
【问题描述】:
使用以下代码(我已经混淆了实际凭据):
CloudStorageAccount cloudStorageAccount = new CloudStorageAccount(new StorageCredentials(username, key), true);
CloudQueueClient clnt = cloudStorageAccount.CreateCloudQueueClient();
string logQueueReference = "log2";
CloudQueue queue = clnt.GetQueueReference(logQueueReference);
queue.CreateIfNotExists();
生成以下请求:
HEAD /log2?comp=metadata&timeout=90 HTTP/1.1
x-ms-version: 2012-02-12
User-Agent: WA-Storage/2.0.6.0
x-ms-date: Tue, 29 Apr 2014 13:26:29 GMT
Authorization: SharedKey username:transformedkey
Host: username.queue.core.windows.net
并返回以下响应:
HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Transfer-Encoding: chunked
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: 0cc84a81-73e1-4a8c-bf16-098af2b21149
Date: Tue, 29 Apr 2014 15:26:29 GMT
我已经仔细检查了凭据。它们是从 manage.windowsazure.com 的对话框中复制粘贴的。我在这里错过了什么?
【问题讨论】:
标签: azure message-queue