1
Vote

Cannot use account key that contains "=" for XDrives

description

My storage account key ends with "==". Following piece of code in XDrives.cs malforms this key:
 
char[] aStorageCredentialDelims = { '=' };
string[] aStorageCredential = sStorageCredential.Split(aStorageCredentialDelims);
 
Resulting in System.FormatException: Invalid length for a Base-64 char array.
 
I suggest to discard the custom parsing and use CloudStorageAccount.FromConfigurationSetting().

comments