服务器无法对请求进行身份验证 - Azure 队列存储 REST API(PUT 方法)

问题描述 投票:0回答:1

关注此 TechCommunity MS 文章,了解存储队列数据迁移:

从该文章来看,源存储帐户上的列表队列的第一个 REST API 工作正常。

现在,正在处理标有以下语句的第二个 REST API:

在目标存储帐户中创建具有相同名称的队列。

上下文此 REST API 将源存储队列放入目标存储帐户。

我不知道从哪里获取这些标头的值:

x-ms-request-id
x-ms-version
Date
以传入 Post 方法 REST API。

我只知道以下标题的值:

Server
Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0

我的休息API

https://deststore121.queue.core.windows.net/azure-webjobs-blobtrigger-csstechwebapp?<SOURCE_STORAGE_SAS_TOKEN>

错误

<Error>
    <Code>AuthenticationFailed</Code>
    <Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Time:2024-03-06T06:11:20.2934664Z</Message>
azure postman azure-storage azure-queues azure-rest-api
1个回答
0
投票

在目标存储帐户中创建具有相同名称的队列。

我遵循了您在我的环境中共享的相同文档。

第一步:

要列出队列,请使用源存储帐户 URL 和源 SAS 令牌。

邮递员:

enter image description here

现在,要在不同的存储或目标存储帐户中创建相同的队列,您需要在目标存储帐户中创建 SAS 令牌。

在我的环境中,我通过门户从目标存储帐户创建了 SAS 令牌。

第二步:

要在目标存储帐户中创建新队列,请按照以下请求操作。

邮递员:

enter image description here

传送门: enter image description here

参考:

创建队列(REST API)- Azure 存储 |微软学习

© www.soinside.com 2019 - 2024. All rights reserved.