title: storage key not a valid base64 encoding - azure storage - android
body: <p>I am trying to upload a text blob to azure storage blob using the following code:</p>
  
  <pre><code>public static final String storageConnectionString = "DefaultEndpointsProtocol=http;"
          + "AccountName=MY_STORAGE_ACNT;"
          + "AccountKey=[MYKEY]";
  
  
  CloudStorageAccount account = CloudStorageAccount.parse(storageConnectionString);
  
          CloudBlobClient blobClient = account.createCloudBlobClient();
  
          CloudBlobContainer container = blobClient.getContainerReference("ubiety");
  
          container.createIfNotExists();
          BlobContainerPermissions containerPermissions = new BlobContainerPermissions();
          containerPermissions.setPublicAccess(BlobContainerPublicAccessType.CONTAINER);
          container.uploadPermissions(containerPermissions);
          CloudBlockBlob blob1 = container.getBlockBlobReference("storage_name");
          blob1.uploadText("Hello, World1");
  </code></pre>
  
  <p>This is a mere copy paste of the sample at <a href="https://github.com/Azure/azure-storage-java/blob/master/microsoft-azure-storage-samples/src/com/microsoft/azure/storage/blob/gettingstarted/BlobBasics.java" rel="nofollow">BlobBasics Sample</a>, still </p>
  
  <p>I get the error </p>
  
  <blockquote>
    <p>StorageKey is not a valid Base64 Encoded string. </p>
  </blockquote>
  
  <p>Can someone please help. I am very sure, i am using the correct key provided at the azure portal</p>
  
  <p>Thank you.</p>