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(); }
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"); }