How to pause download while downloading a file from azure.

Hi

I have to pause the download on the failure of network or on any error occurred  during the downloading from blob storage.

Please

March 20th, 2015 7:28am

Hi Pawan,

Please confirm how exactly you are trying to download the file from Azure!!

Are you using Storage explorer or Direct from URL or any other method to download file from Azure?

Regards,

Manu Rekhar

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 8:12am

Hi i am using cloud blob container here's is my code for downloading

   private void _bgw_downloadfile_DoWork(object sender, DoWorkEventArgs e)
        {
            AddtoLogFile("download file do worker called", "_bgw_downloadfile_DoWork");
          
            try
            {
                string dwnlocfile = fbd_downloadFileLoc.SelectedPath;

                DataGridViewRow row = dgv_downloadfile.CurrentCell.OwningRow;
                string filenameazure = row.Cells["filename"].Value.ToString();
                string filename = Path.GetFileName(filenameazure);
                string fileext = Path.GetExtension(filenameazure);
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=http;AccountName=" + ACCOUNTNAME + ";AccountKey=" + ACCOUNTKEY);

                // Create the blob client.
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

                // Retrieve reference to a previously created container.
                CloudBlobContainer container = blobClient.GetContainerReference("filetransfer");

               
                CloudBlockBlob blockBlob = container.GetBlockBlobReference(filenameazure);

                // Save blob contents to a file.
                using (var fileStream = System.IO.File.OpenWrite(dwnlocfile + "\\" + filename))
                {
                    blockBlob.DownloadToStream(fileStream);
                }
            }
            catch (Exception ex)
            {
             
                AddtoLogFile(ex.ToString(), "_bgw_downloadfile_DoWork");
             
            }

        }

March 20th, 2015 8:27am

Are you trying to download resume? If so the this is taken care of in the client library.
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 6:18pm

Hi Pawan,

Any updates?

Regards,
Malar.

March 24th, 2015 12:40pm

Hi Malar,

cant find the solution still working using event handler to achieve the goal.

If you have any idea please suggest.

Thanks

Free Windows Admin Tool Kit Click here and download it now
March 24th, 2015 11:46pm

Heres the link which I follow to achieve the goal

 http://www.codeproject.com/Articles/35954/C-NET-Background-File-Downloader

March 26th, 2015 6:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics