简体   繁体   English

Microsoft.WindowsAzure.Storage.dll中发生未处理的“System.StackOverflowException”类型异常

[英]An unhandled exception of type 'System.StackOverflowException' occurred in Microsoft.WindowsAzure.Storage.dll

I am presently working with windows 10 universal application, here i am working with azure storage. 我目前正在使用Windows 10通用应用程序,这里我正在使用azure存储。

I am getting above error when i downloading file file from windows azure storage. 当我从windows azure存储下载文件文件时,我遇到了上述错误。

Here is my download code: 这是我的下载代码:

private async Task<int> DownloadFromAzureStorage()
{
   try
     {
     //  create Azure Storage
     CloudStorageAccount storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=<myaccname>;AccountKey=<mykey>");

     //  create a blob client.
     CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

     //  create a container 
     CloudBlobContainer container = blobClient.GetContainerReference("sample");

     await container.CreateIfNotExistsAsync();

    //  create a block blob
    CloudBlockBlob blockBlob = container.GetBlockBlobReference("abc.jpg");

    FileSavePicker openPicker = new FileSavePicker();
    openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
    openPicker.FileTypeChoices.Add("File", new List<string>() { ".jpg" });
    openPicker.SuggestedFileName = "New Documents";
    var imgFile = await openPicker.PickSaveFileAsync();

    await blockBlob.DownloadToFileAsync(imgFile); **//Error occuring in this line**
    return 1;
    }
    catch
     {
       //  return error
       return 0;
     }
   }

File Uploading to my azure storage is success, but when i download to my uploaded my it showing the error is "An unhandled exception of type 'System.StackOverflowException' occurred in Microsoft.WindowsAzure.Storage.dll" in await blockBlob.DownloadToFileAsync(imgFile); 文件上传到我的azure存储是成功的,但当我下载到我的上传我显示错误是“在Microsoft.WindowsAzure.Storage.dll中发生类型'System.StackOverflowException'未处理的异常” 等待blockBlob.DownloadToFileAsync(imgFile ); Line 线

please help me to resolve this issue.. 请帮我解决这个问题..

This is a known issue with the DownloadToFileAsync() method in the Win10 Universal Storage Client (unfortunately). 这是Win10 Universal Storage Client中的DownloadToFileAsync()方法的一个已知问题(遗憾的是)。 The bug is fixed in the current preview release (7.0.2-preview), and will be fixed in an upcoming non-preview release. 该错误已在当前预览版本(7.0.2预览版)中修复,并将在即将发布的非预览版本中修复。 To fix your issue for now, please change your DownloadToFile call to the following: 要解决您现在的问题,请将您的DownloadToFile调用更改为以下内容:

await blockBlob.DownloadToFileAsync(imgFile, null, null, null, CancellationToken.None);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft.WindowsAzure.Storage.dll中出现“Microsoft.WindowsAzure.Storage.StorageException”类型的第一次机会异常 - A first chance exception of type 'Microsoft.WindowsAzure.Storage.StorageException' occurred in Microsoft.WindowsAzure.Storage.dll 在引用Microsoft.WindowsAzure.Storage.DLL时生成错误 - Build error on referencing Microsoft.WindowsAzure.Storage.DLL 天蓝色函数中的Microsoft.WindowsAzure.Storage.dll版本不匹配错误 - Microsoft.WindowsAzure.Storage.dll version mismatch error in azure functions FileNotFoundException,找不到Microsoft.WindowsAzure.Storage.dll v5.0.2 - FileNotFoundException, Could not find Microsoft.WindowsAzure.Storage.dll v5.0.2 Microsoft.Azure.Devices.dll 中发生类型为“System.FormatException”的未处理异常 - An unhandled exception of type 'System.FormatException' occurred in Microsoft.Azure.Devices.dll 引用Microsoft.WindowsAzure.Storage.dll并在Azure自动化下的Runbook中使用CreateCloudBlobClient()方法创建Cloud Blob客户端 - Referencing Microsoft.WindowsAzure.Storage.dll and creating Cloud Blob Client using CreateCloudBlobClient() method in Runbook under Azure Automation 命名空间“Microsoft.WindowsAzure”中不存在类型或命名空间名称“Storage” - The type or namespace name 'Storage' does not exist in the namespace 'Microsoft.WindowsAzure' 引发类型为“ Microsoft.WindowsAzure.StorageClient.StorageClientException”的异常 - Exception of type 'Microsoft.WindowsAzure.StorageClient.StorageClientException' was thrown 抛出类型为Microsoft.WindowsAzure.StorageClient.StorageClientException的异常 - Exception of type Microsoft.WindowsAzure.StorageClient.StorageClientException was thrown 无法从程序集'Microsoft.WindowsAzure.Storage,Version = 4.3.0.0加载类型'Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob' - Could not load type 'Microsoft.WindowsAzure.Storage.Blob.CloudAppendBlob' from assembly 'Microsoft.WindowsAzure.Storage, Version=4.3.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM