Azure的Blob服务REST API返回403错误:"未指定&QUOT申请日期头; [英] Azure Blob Service REST API returns 403 error: "Request date header not specified"
问题描述
我尝试使用Blob服务REST API,签单集装箱(REST API):
http://msdn.microsoft.com/en-us/library/windowsazure /dd179352.aspx
I try to use Blob Service REST API, List Containers (REST API): http://msdn.microsoft.com/en-us/library/windowsazure/dd179352.aspx
所以,我从管理Portal-访问键>托管服务,存储帐户与CDN - >存储帐户,在这里我选择了我的存储(aziztest),并获得钥匙从View访问键:
有2个按键中小学。
So I get access keys from Management Portal->Hosted Services, Storage Accounts & CDN -> Storage Accounts, where I selected my storage (aziztest) and get keys from View Access Keys: there are 2 keys Primary and Secondary.
然后使用我创建的字符串来登录:
GET \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ NX-MS-日期:星期三,2012年2月29日6时05分13秒GMT \\ NX-MS-版本:2009- 09-19 \\ N / aziztest \\ NCOMP:列表
Then using I created String to Sign: GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Wed, 29 Feb 2012 06:05:13 GMT\nx-ms-version:2009-09-19\n/aziztest\ncomp:list
和使用我的存储主访问键使授权头:
授权:SharedKey aziztest:OjfrOTuO4zy1oUWGHkw8uj3%2BgAZq33GWe15gPT / PK%2BK%3D
and make Authorization header using Primary Access Key of my storage: Authorization: SharedKey aziztest:OjfrOTuO4zy1oUWGHkw8uj3%2BgAZq33GWe15gPT/PK%2Bk%3D
和然后进行GET请求:
http://aziztest.blob.core.windows.net/?comp=list一>
And then make GET request to: http://aziztest.blob.core.windows.net/?comp=list
不过,我得到一个错误: AuthenticationFailed
服务器无法验证请求。确保授权头的值是正确形成包括签名\\ nRequestId:892d1f31-a20d-45a5-B16A-2f7c07519863 \\ n时间:2012-02-29T00:02:未指定44.2841133ZRequest日期标题
But I get an error:
AuthenticationFailed
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:892d1f31-a20d-45a5-b16a-2f7c07519863\nTime:2012-02-29T00:02:44.2841133ZRequest date header not specified
什么是错误的,我的程序?
What is wrong in my procedure?
推荐答案
你所做的似乎pretty好,我presume你跟随的关于如何创建认证头 MSDN上的指示?我可以看到你使用它们,你都签署字符串中,但你有没有包括 X-MS-日期
和 X-MS-版本
实际上是在你的请求头?该错误消息将表明你没有。
What you've done seems pretty good, I presume you're following the instructions on MSDN on how to create the authentication header? I can see you've used them in the string which you are signing, but have you included x-ms-date
and x-ms-version
actually in your request header? The error message would indicate you haven't.
这篇关于Azure的Blob服务REST API返回403错误:"未指定&QUOT申请日期头;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!