zoukankan      html  css  js  c++  java
  • 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>
    

    问题原因和解决

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

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

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

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

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

     
     
  • 相关阅读:
    实现168732363.66元用逗号格式为168,732,363.66元
    程序员的十步学习法
    js中字符串方法大全
    js中数组方法大全
    异常,常用工具
    抽象类,常用类
    this 关键字
    面向对象
    DOS.JDK
    Android
  • 原文地址:https://www.cnblogs.com/huyuchengus/p/13894550.html
Copyright © 2011-2022 走看看