使用.Net API startCopy将页面Blob从一个存储帐户复制到另一个存储帐户 [英] Copy page blob from one storage account to Another storage account using .Net API startCopy

查看:93
本文介绍了使用.Net API startCopy将页面Blob从一个存储帐户复制到另一个存储帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用.net API startCopy将一个存储帐户中的页面Blob复制到另一个存储帐户.这两个存储帐户均为标准类型,并且源位置中存在blob.我收到以下异常详细信息的"cannotverifysourcepath"错误.

I am trying to copy a page blob in one storage account to another storage account using .net API startCopy. Both storage accounts are standard type and blob exists in source location. I am getting "cannotverifysourcepath" error with below exception details.

我希望startcopy API可以从帐户复制到另一个帐户.谁能帮我找出问题所在吗?

I was hoping that startcopy API works to copy from account to another. Can anyone please help me to figure out what's the issue here?

Exception- Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
   --- End of inner exception stack trace ---
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
   at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.StartCopy(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
   at Microsoft.WindowsAzure.Storage.Blob.CloudPageBlob.StartCopy(CloudPageBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
Request Information
RequestID:1a82f5b6-0001-008f-7328-26bec1000000
RequestDate:Fri, 14 Oct 2016 14:35:31 GMT
StatusMessage:The specified resource does not exist.
ErrorCode:CannotVerifyCopySource

推荐答案

您可以尝试使用

You can try using the data movement library. Specifically:

await TransferManager.CopyAsync(source, target, false);

布尔值参数指定这是否是服务端异步副本.如果是这样,则本地任务可能会在复制完成之前完成.

The boolean parameter specifies whether or not this is a service-side asynchronous copy. If it is, the local task may complete before the copy is complete.

我已经验证了sourcetarget在不同的帐户中并且两个访问策略都是私有"的情况下可以正常工作.

I have verified that this works when source and target are in different accounts and both access policies are 'private.'

这篇关于使用.Net API startCopy将页面Blob从一个存储帐户复制到另一个存储帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆