Tag: azure storage blobs

Blob容器创buildexception

每次我尝试为blob创build一个容器时,都会收到一个exception 使用下面的代码 CloudStorageAccount storageAccInfo; CloudBlobClient blobStorageType; CloudBlobContainer ContBlob; blobStorageType = storageAccInfo.CreateCloudBlobClient(); //then I initialize storageAccInfo ContBlob = blobStorageType.GetContainerReference(containerName); //everything fine till here ; next line creates an exception ContBlob.CreateIfNotExist(); Microsoft.WindowsAzure.StorageClient.StorageClientException was unhandled Message="One of the request inputs is out of range." Source="Microsoft.WindowsAzure.StorageClient" StackTrace: at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() at Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImplWithRetry[T](Func`2 impl, RetryPolicy policy) at Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist(BlobRequestOptions options) […]

尝试创build资产时出现System.NotSupportedException

我正尝试在Azure托pipe的API Service中使用Azure MediaService API和Azure Storage API 。 用户将videostream作为HttpPost发送到服务,该服务将video作为Blob存储在我的存储帐户中,媒体服务对video进行编码,并且当video的链接准备就绪时,将其返回给用户。 但是,当我试图创build一个Asset System.NotSupportedException引发的消息: 抛出的exception:Microsoft.Data.Services.Client.dll中的“System.NotSupportedException”抛出exception:mscorlib.dll中的“System.NotSupportedException”iisexpress.exe错误:0:exception= System.NotSupportedException:此目标框架无法启用直接枚举数据服务查询。 这是因为枚举自动向数据服务发送同步请求。 由于此框架仅支持asynchronous操作,因此您必须调用BeginExecute和EndExecute方法来获取支持枚举的查询结果。 我正在使用以下版本的所需的依赖关系: Microsoft.Data.Services.Client – 5.6.2.0 Microsoft.WindowsAzure.MediaServices.Client – 3.0.0.8 Microsoft.WindowsAzure.Storage – 3.1.0.1 这是我的代码: CloudMediaContext _context; IAsset asset; using (MemoryStream Ms = new MemoryStream(data.Data)) { _context = new CloudMediaContext("accountName", "accountKey"); asset = await _context.Assets.CreateAsync("blobContainerName", AssetCreationOptions.None,CancellationToken.None); … … } data.Data包含video的byte[] 。 CreateAsync被调用时引发exception。 我试过_context.Assets.Create没有运气。 重要的编辑 我创build了一个新的控制台应用程序,使用了我在API服务中使用的代码,并成功执行了它。 […]

如何在不编写自己的程序的情况下将某个file upload到Azure blob存储?

我创build了一个Azure存储帐户。 我有一个400兆字节的.zip文件,我想把它放到blob存储中供以后使用。 我怎么能不写代码呢? 有一些接口吗?