none
How to copy the blob's from source container to destination container in windows azure and asp.net

    General discussion

  • How to copy the blob's from source container to destination container in windows azure and asp.net

    i am using following code its not working

     CloudStorageAccount csa = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
                CloudBlobClient blobClient = csa.CreateCloudBlobClient();

                CloudBlobContainer DestinationContainrer = blobClient.GetContainerReference(azureBlobContainerName);
                DestinationContainrer.CreateIfNotExist();
                CloudBlobContainer sourceContainrer = blobClient.GetContainerReference(source);

                foreach (CloudBlob oblob in sourceContainrer.ListBlobs())
                {
                    CloudBlob nblob = DestinationContainrer.GetBlobReference(oblob.Name);
                    nblob.CopyFromBlob(oblob);
                } 


    Friday, November 09, 2012 4:51 AM

All replies

  • It's great that you've shared the actual code you tried, but "It's not working" is a fairly useless description of the problem.

    If you want help, tell people what went wrong. Did the code fail to compile? Did it compile but raise an exception when it ran? What line was the exception on? What was the exception? Did it run without any exceptions but not do what you expected? If so, what did it do, and what did you expect?

    Friday, November 09, 2012 4:20 PM