Reputation: 103
The "Microsoft Azure Configuration Manager" library is not compatible with UAP apps and it seems that I need it to access the CloudConfigurationManager class for connecting to Azure Storage. It is used to parse the connection string:
// Parse the connection string and return a reference to the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
Am I missing something here or is there maybe an alternative approach for getting connected for UWP app developers?
The guide I'm referring to: HERE
Upvotes: 0
Views: 681
Reputation: 1071
I don't believe you have to use CloudConfigurationManager.
You could connect to it manually:
var credentials = new StorageCredentials("accountname", "accountkey");
var account = new CloudStorageAccount(credentials, true);
Note: You will have to have WindowsAzure.Storage referenced but that is compatible with UWP. Its the configuration manager that is not.
Upvotes: 0
Reputation: 4062
As per January, there was no support for Azure Storage as a UWP client library. I could not find if there is any update on that, so i suppose you to use the REST API instead of client library (at least for now). Anyway, client library is just a wrapper around REST API. Also, i tried to find recently any ready-to-go up-to-date Azure Storage wrappers written by community, and looks like the simplest way is to write it by yourself than to try to find the ready solution (most of the solutions i have found were old).
REST API reference Tutorial on how to use Azure Storage REST API
Upvotes: 0