来自iOS设备的Azure Blob存储:服务器无法验证请求

时间:2015-12-03 04:47:07

标签: ios iphone swift azure azure-storage-blobs

获取 - "服务器无法验证请求。确保正确形成Authorization标头的值,包括签名。"在验证azure存储客户端时。 一切都适用于xcode模拟器。上传,下载和创建新容器。但是从我的iOS设备来看,iPhone 5s和iPad无法通过身份验证。

代码(swift)

凭证= AuthenticationCredential(azureServiceAccount:" myStorageAccount",accessKey:" myKeyIsHere") client = CloudStorageClient(凭证:凭证)

我已经看到有关Windows操作系统中一些类似问题的问题,其答案似乎指向机器时钟与服务器不同步的方向。

但在我的情况下,我真的看不到任何时钟/时间问题。

任何线索?

1 个答案:

答案 0 :(得分:0)

嗯,你在使用Azure Storage iOS Client Library吗?

如果是这样,你的快速代码应该是

let storageAccount = AZSCloudStorageAccount(fromConnectionString: yourConnectionString)

getting started也应该有所帮助。