Created
November 20, 2012 10:08
-
-
Save udooz/4117102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ContainerName = "aContainer"; | |
var creds = "DefaultEndpointsProtocol=http;AccountName=accName;AccountKey=hidden"; | |
var sourceAccount = Microsoft.WindowsAzure.CloudStorageAccount.Parse(creds); | |
var cloudBlobClient = new Microsoft.WindowsAzure.StorageClient.CloudBlobClient(sourceAccount.BlobEndpoint.ToString(), sourceAccount.Credentials); | |
var blobContainer = cloudBlobClient.GetContainerReference(ContainerName); | |
try | |
{ | |
blobContainer.FetchAttributes(); | |
Console.WriteLine("Success"); | |
} | |
catch(Exception e) | |
{ | |
Console.WriteLine("given source storage container not in correpanding source storage account.Aborting..."); | |
} | |
Console.WriteLine("Completed"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment