Azure 对象存储提示令牌过期

在程序运行到一段时间后,发现上传文件的时候提示:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
   <Code>AuthenticationFailed</Code>
   <Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:c443ad49-c01e-0083-126e-ad5565000000
Time:2020-10-28T21:10:53.9706211Z</Message>
   <AuthenticationErrorDetail>Signature not valid in the specified time frame: Start [Wed, 28 Oct 2020 20:43:29 GMT] - Expiry [Wed, 28 Oct 2020 20:45:29 GMT] - Current [Wed, 28 Oct 2020 21:10:53 GMT]</AuthenticationErrorDetail>
</Error>

 

azure-storage-01

azure-storage-011275×508 91.3 KB

 

问题原因和解决

出现上面的提示的原因是你的 sasToken 过期了。

在 Azure 存储的时候,如果你生成 sasToken,在这个 token 上面有一个有效期的设置,在默认的时候这个有效期的时间非常短。

你可以设置为更长的时间。

 

azure-storage-02

 

 

单击上面的链接,修改令牌的有效期后生成新的令牌。

这样就可以保证你的存储不快速过期。

 

azure-storage-03

 

 

https://www.ossez.com/t/azure/621

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

HoneyMoose

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值