GET-AzureStorageBlobContent例外下载一个blob [英] Get-AzureStorageBlobContent Exception to download a blob

查看:258
本文介绍了GET-AzureStorageBlobContent例外下载一个blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令从提供的容器下载的blob,但它给我下面的异常。

code

  $ subscriptionName =mysubscrition
$ storageAccount =我的帐户
$容器名称=myContainer中设置AzureSubscription -SubscriptionName $ subscriptionName -CurrentStorageAccount $ storageAccount
GET-AzureStorageContainer - 集装箱$容器名称
GET-AzureStorageBlob - 集装箱$容器名称|排序上次更改-Descending |选择对象 - 第一1 | GET-AzureStorageBlobContent -Blob名-DestinationC:\\ BlobDownload-Force |外空

EXCETION

  GET-AzureStorageBlobContent:无法加载文件或程序'Microsoft.WindowsAzure.Storage.DataMovement,版本= 2.2.1.0,文化=中立,
公钥= 31bf3856ad364e35或它的一个依赖。该系统找不到指定的文件。
在行:7字符:106
+获取-AzureStorageBlob - 集装箱$容器名称|排序上次更改-Descending | ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo:NotSpecified:(:) [获取-AzureStorageBlobContent],FileNotFoundException异常
+ FullyQualifiedErrorId: System.IO.FileNotFoundException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlobContentCommand


解决方案

这实际上是通过与WiX的安装程序和DLL Storage.DataMovement的版本号的问题引起的。在升级过程中,Windows安装程序不会使用相同的文件的较低版本替换文件。什么happes是文件标记为删除,与下版本文件替换是不允许,然后该文件被删除(但不是替代)。

您可以通过两种方式解决这个问题:

(1)修复控制面板中的安​​装 - >卸载程序

(2)用较新的版本替换(0.8.5为例)。在最近的版本不应该显示这个问题。

I am using following command to download blob from provided container but it give me following exception.

Code

$subscriptionName = "mysubscrition"
$storageAccount = "myaccount"
$containerName = "mycontainer"

Set-AzureSubscription -SubscriptionName $subscriptionName -CurrentStorageAccount $storageAccount
Get-AzureStorageContainer -Container $containerName
Get-AzureStorageBlob -Container $containerName | Sort LastModified -Descending |Select-Object -First 1 | Get-AzureStorageBlobContent -Blob name -Destination "C:\BlobDownload" -Force | Out-Null

Excetion

Get-AzureStorageBlobContent : Could not load file or assembly 'Microsoft.WindowsAzure.Storage.DataMovement, Version=2.2.1.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
At line:7 char:106
+ Get-AzureStorageBlob -Container $containerName | Sort LastModified -Descending | ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-AzureStorageBlobContent], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlobContentCommand

解决方案

This is actually caused by an issue with the wix installer and the version number of the Storage.DataMovement dll. During an upgrade, the Windows Installer will not replace a file with a lower version of the same file. What happes is that the file is marked for deletion, the replacement with the lower version file is disallowed, and then the file is removed (but not replaced).

You can solve this in two ways:

(1) Repair the install in Control Panel -> Uninstall a program

(2) Replace with a more recent version (0.8.5, for example). The more recent versions should not display this issue

这篇关于GET-AzureStorageBlobContent例外下载一个blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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