Ejemplo n.º 1
0
        public StorageContext(AzureSpeedStorageAccount account)
        {
            // todo: change to environment
            string endpointSuffix = string.IsNullOrEmpty(account.EndpointSuffix)
                ? "core.windows.net"
                : account.EndpointSuffix;

            var storageAccount = new CloudStorageAccount(new StorageCredentials(account.Name, account.Key),
                                                         endpointSuffix, true);

            blobClient = storageAccount.CreateCloudBlobClient();
        }
Ejemplo n.º 2
0
 public string EnableStorageCORS(AzureSpeedStorageAccount account)
 {
     try
     {
         var storageAccount = new StorageContext(account);
     }
     catch (Exception ex)
     {
         logger.Error(ex);
         return("Failed due to Incorrect Account Name or Key.");
     }
     return("Enabling CORS Succeed");
 }