Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Upload to azureBlob fails

$
0
0

Hi,

I'm exporting an entity then sending the file to azure blob.

However when the file gets bigger, i noticed that uploading is failing. (exporting the entity was a succes)

i received files with 1.8GB,1.9GB and when i increased the records it started failing.

Here's my code

system.exception ex;
try
{
Microsoft.WindowsAzure.Storage.Auth.StorageCredentials  storageCredentials  = new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials(StorageAccountName, StorageKey);
Microsoft.WindowsAzure.Storage.CloudStorageAccount      storageAccount      = new Microsoft.WindowsAzure.Storage.CloudStorageAccount(storageCredentials, true);
var                                                     blobcli             = storageAccount.CreateCloudBlobClient();
Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer  cont                = blobcli.GetContainerReference(BlobContainer);

stream.Position=0;

Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob      cloudBlockBlob      = cont.GetBlockBlobReference(fileName);
cloudBlockBlob.UploadFromStream(stream,null,null,null);
}
catch(ex)
{ 
 throw error(ex.message);
}

My question is:

1. Why is it failing? is there a restriction on sizes bigger than 2GB? and how to solve this?
2. why I'm not catching the error that is happening?


Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>