none
Visual Studio 2013 Tells Me Storage Account Key Is Invalid

    Question

  • I am trying to use the Azure Storage tree under Server Explorer. VS2013 tells me "storage account key is invalid" - It sounds like a simple enough message. The problem is we have other machines that connect just fine using the same key and account. In fact, this same machine does work about 10% of the time (without touching the Azure connection settings it will work one day and not another).  And yes we have copied and pasted several times to make sure we are using the right key.  We have tried both primary and secondary keys and have reset the keys once.  None of that changed the results.  And we are using the HTTPS connection.

    I am absolutely convinced that we have the right account and key.  What else can cause VS2013 to say the current storage account key is invalid?  I found some references to having your clock off can cause this kind of error which gave me hope, but we have sync'd the clock many times and it does not change the result.

     
    • Edited by burkeden Wednesday, June 24, 2015 8:16 PM
    Wednesday, June 24, 2015 1:22 PM

Answers

All replies

  • Hi,

    What is the version of Azure SDK that you use?
    You can check this by going to Help -> About Microsoft Visual Studio inside VS and see the version of Windows Azure Tools.
    Also did you
    install the Azure SDK manually or through WebPI?

    Regards,
    Malar.

    Thursday, June 25, 2015 11:56 AM
  • I don't see one exactly called Azure SDK, so here is what I see in HELP - About that has anything to o with Azure:

    • Common Azure Tools 1.4
    • Microsoft Azure Mobile Services Tools 1.3
    • Microsoft Azure Tools 2.6
    • Windows Azure Tools 2.3

    I believe I installed all of the Azure related items via WebPI.

    Thanks for any help.

    Thursday, June 25, 2015 12:40 PM
  • Hi,

    Do you get the error something like this ?

    The Azure tools get the storage account credentials automatically when you connect to Azure, or by using a subscription file (.publishsettings file).

    Have you tried to specify your storage account settings manually? To do so, get your storage account name and primary key from the Management Portal, and then choose Manually entered credentials.

    Also, Do you have more than one Azure subscription in your .publishsettings file? The plugin will only look in the first subscription for the storage account. If so, try removing the subscription that you are not using.

    Regards,

    Shirisha Paderu

    • Proposed as answer by Ahsan KabirMVP Wednesday, July 1, 2015 8:41 PM
    Wednesday, July 1, 2015 1:55 PM
    Moderator
  • That is exactly the message I get. It is a pop up dialog and allows to enter a new account name and/or storage key. I have entered it manually many times. And as I mentioned, I have even changed the key and tried both the primary and secondary. I am quite convinced that I am entering the correct account and key. And in fact both of them work from other machines.
    Wednesday, July 1, 2015 8:19 PM
  • Hello Shirisha,

    This is dialog box that I get (and note that the credentials are present in the dialog exactly as I entered them, so it is not losing them).  I am not sure where I choose Manually entered credentials.  I do have more than one Azure subscription, so this could be it.  The tools seem to allow me to choose which account I want to use and remember the credentials for both accounts - so not sure why it can only work with the first storage account.  I in fact need to connect to two accounts from the same solution, so even if this is the root cause of the problem, there does not appear to be an acceptable solution.

    Wednesday, July 1, 2015 9:04 PM
  • Have you tried downloading the latest .NET SDK for VS 2013 http://azure.microsoft.com/en-us/downloads/? Also, how did you get to that screen? When I want to connect to my Storage account I simply right-click Azure and sign in with my username and password - no Storage account name or account key needed. 


    
    Tuesday, July 14, 2015 6:38 PM
    Moderator
  • Yes, I am running the latest version. I in fact removed and reinstalled it aweek back to try to resolve the problem - to no avail. I have "Microsoft Azure Tools for Microsoft Visual Studio 2013 - v2.6"

    I also only provide my Azure username and password. It is only when it has a problem connecting that it then brings up that dialog which asks for the storage account key. And when it does ask, it already has it populated with the correct values.

    Tuesday, July 14, 2015 8:31 PM
  • Just signing in to say you're not alone on this! I have the exact same problem as you. Oddly enough, I have 3 storage accounts, and the problem's only on one of them (and only via Server Explorer - Azure.)
    Thursday, November 19, 2015 12:45 PM
  • Update: installing the latest Azure SDK for .NET VS 2013 (November 18 2015) has fixed my woes. Happy days!
    Thursday, November 19, 2015 1:29 PM
  • When I moved to VS 2015 and the SDK for it, the problem went away for me.
    Friday, November 20, 2015 7:58 PM