【发布时间】:2016-08-04 15:07:51
【问题描述】:
我正在尝试将 blob 从一个存储帐户复制到另一个(在不同的位置)。
我正在使用以下代码:
var sourceContainer = sourceClient.GetContainerReference(containerId);
var sourceBlob = sourceContainer.GetBlockBlobReference(blobId);
if (await sourceBlob.ExistsAsync().ConfigureAwait(false))
{
var targetContainer = targetClient.GetContainerReference(containerId);
await targetContainer.CreateIfNotExistsAsync().ConfigureAwait(false);
var targetBlob = targetContainer.GetBlockBlobReference(blobId);
await targetBlob.DeleteIfExistsAsync().ConfigureAwait(false);
await targetBlob.StartCopyAsync(sourceBlob).ConfigureAwait(false);
}
我收到“未找到”错误。 我确实知道源 blob 确实存在。 我使用了错误的命令吗?关于在存储帐户之间进行复制,我有什么遗漏吗?
【问题讨论】:
-
请提供完整的错误信息
-
远程服务器返回错误:(404) Not Found。 --- 指定的资源不存在。
标签: c# azure-storage azure-blob-storage