gpt4 book ai didi

c# - Blob上传未授权 服务器无法验证请求异常

转载 作者:行者123 更新时间:2023-12-03 05:09:50 24 4
gpt4 key购买 nike

我一周前使用了这个代码,一切都很好。我的同事仍然使用完全相同的代码,他们完全没有问题。

StorageCredentialsAccountAndKey heronStorage = new StorageCredentialsAccountAndKey("heron", "someKey");
CloudBlobClient blobClient = new CloudBlobClient("someUrl", heronStorage);
CloudBlobContainer container = blobClient.GetContainerReference("containerName");
container.CreateIfNotExist();
container.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });

此代码抛出:“服务器无法对请求进行身份验证。请确保授权 header 的值格式正确,包括签名。” at container.CreateIfNotExist(); 线。

我复制了他们的代码,结果还是一样。我已经没有主意了。

最佳答案

确保您的系统时钟正确同步,错误的时区和不正确的同步会导致哈希失败。服务器使用时间作为同步的一部分来验证请求。

关于c# - Blob上传未授权 服务器无法验证请求异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15874847/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com