在哪里可以找到我的 Azure 帐户名和帐户密钥?
我从 Windows Azure 开始。我拥有 Microsoft 的 Azure 帐户,并希望从我的 Visual Studio 项目中使用它
在 Azure 管理门户中,我可以看到主访问密钥和辅助访问密钥。但是 Visual Studio 需要帐户名和帐户密钥。
这些是相关的还是我错过了什么?如果是这样,如何从 Azure 管理门户获取我的帐户名和帐户密钥?
I am starting with Windows Azure. I have an Azure account with Microsoft and would like to use it from my Visual Studio project
In the Azure management portal, I can see the primary access key and secondary access key. However Visual Studio needs the account name and account key.
Are these related or am I missing something? If so, how can I get my account name and account key from the Azure management portal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您指的是Windows Azure 存储帐户,则存储帐户名称将是您创建的dns 前缀(例如mystorage.blob.core.windows.net - 名称将是mystorage)。
然后你会得到两把钥匙——主钥匙和辅助钥匙。指定其中之一。您有两个,因此您可以将其中一个分发给某人(例如将辅助密钥提供给第三方监控公司)并通过更改密钥来撤销它,而不会影响您(假设您自己使用主密钥)。
If you're referring to a Windows Azure Storage account, the storage account name would be the dns prefix you created (e.g. mystorage.blob.core.windows.net - the name would be mystorage).
You then get two keys - primary and secondary. Specify either. You have two so you can give one out to someone (such as giving the secondary key to a 3rd-party monitoring company) and revoke it by changing the key, without impacting you (assuming you're using the primary key for yourself).
用户界面发生了一些变化,但总体上是相同的地方:
请注意,在该键的右侧有一个连接字符串。在那里您还可以清楚地看到名称和密钥。
The user interface changed a little bit but it's generally the same place:
Note that on the right side of the key you have a Connection String. There you can clearly see the name and the key as well.
随着 Azure UI 更新添加新答案。
因此,在选择存储帐户(在我的例子中是在AFlash中)后,选择访问密钥选项,您将看到屏幕截图中显示的屏幕
在这里您可以看到两个键的主键和辅助键。
因此,以前这些是 key1 和 key2。
为什么有两把钥匙?
这是为了避免停机。假设您只有一把钥匙并在多个地方使用它。突然间,出于某种原因,你不得不将其分享给某人。因此,您可能需要重新生成此密钥(因为您已经共享了它)并在您之前使用过它的所有地方更新它。因此,为了避免这种情况,我们有辅助密钥,您可以共享并重新生成它,这样主密钥仍然有效。
Adding a new answer as Azure UI is updated.
So, after selecting the storage account(in my case its inAFlash) select Access keys option you will get the following screen shown in the screenshot
Here you see two key's Primary and secondary.
So, previously these were key1 and key2.
Reason for two keys?
it's to avoid downtime. let's say, if you had only one key and used it multiple places. Suddenly you had to share it to someone for some reason. So, you might need to regenerated this key(As you have already shared it) and update it in all places where you used it previously. So, to avoid this, we have secondary key, which you can share and regenerate it so that, primary key will be still valid.
您可以使用 Azure CLI 进行检查
:提取第一个密钥,可以使用以下命令:
You can check it by using Azure CLI:
To extract the first key, you can use the following command: