【发布时间】:2018-02-26 12:08:10
【问题描述】:
我尝试将我的 html 页面上传到 Azure b2c 的 Azure blob 存储,但每当我尝试上传文件时,我都会不断收到此错误:
Azure AD B2C Blob Storage Helper Tool
This tool will upload all contents of a directory to an Azure Blob Storage Container you specify.
It will also enable CORS access from all origins on each of the files.
Enter your Azure Storage Account name:
sample
Enter your Azure Blob Storage Primary Access Key:
***==
Enter your Azure Blob Storage Container name:
https://sample.blob.core.windows/sample
Enter the path to the directory whose contents you wish to upload:
C:\Users\admin\Downloads\B2C-AzureBlobStorage-Client-master\B2C-AzureBlobStorage-Client-master\sample_templates\wingtip
向 Azure Blob 存储发出请求时出错:
远程服务器返回错误:(400) Bad Request。
按 Enter 关闭...
我在这里做错了吗?还是存储助手工具有错误?我已经按照这里的教程https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-ui-customization-helper-tool
【问题讨论】:
-
您是否尝试过在 azure 门户上手动创建容器?它对你可以给容器起什么名字有一些限制。例如:容器名称不能包含大写字母。如果您请求一个名称无效的容器,它将导致您得到 (400) Bad Request。 所以检查你的“containerName”字符串
-
是的,我手动创建容器,小写
-
您能分享您要创建的容器的名称吗?另外,请告知存储帐户的冗余类型(即 LRS、GRS 等?)。
-
这是我的冗余读取访问异地冗余存储 (RA-GRS)。我已经尝试创建新的存储帐户,我的容器名称是 b2c,我的存储帐户名称是 kgvc3
-
@TheodorusAgumGumilang 你应该输入你的容器名称而不是 url,我在我的实验室测试,如果我输入 url,我会得到与你相同的错误日志。
标签: c# azure xamarin.forms azure-storage azure-active-directory