[英]Azure: What are the Account Name and Access Key when using the Storage Emulator?
I'm following this guide: 我正在遵循此指南:
http://blogs.msdn.com/b/brian_swan/archive/2010/07/08/accessing-windows-azure-blob-storage-from-php.aspx http://blogs.msdn.com/b/brian_swan/archive/2010/07/08/accessing-windows-azure-blob-storage-from-php.aspx
but with the emulators, and not with an actual Azure account. 但要使用仿真器,而不要使用实际的Azure帐户。
What should I use in this line? 我应该在这行中使用什么?
$storageClient = new Microsoft_WindowsAzure_Storage_Blob('blob.core.windows.net',
'Your_Storage_Account_Name',
'Your_Primary_Access_Key');
For the emulator, the storage account name is devstoreaccount1
对于仿真器,存储帐户名称为
devstoreaccount1
and the key is Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
并且密钥是
Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
This is independent of language, SDK, etc. and the SDKs typically have shortcuts for dev storage (at least the .NET SDK does). 这与语言,SDK等无关,并且SDK通常具有开发人员存储的快捷方式(至少.NET SDK如此)。 For instance, with .NET and C#, you don't need to know the details of the emulator account:
例如,使用.NET和C#,您不需要知道模拟器帐户的详细信息:
var storageAccount = CloudStorageAccount.DevelopmentStorageAccount;
var blobClient = storageAccount.CreateCloudBlobClient();
$storageClient = new Microsoft_WindowsAzure_Storage_Blob(); $ storageClient = new Microsoft_WindowsAzure_Storage_Blob();
from Windows Azure SDK for PHP http://phpazure.codeplex.com/wikipage?title=Blob%20storage&referringTitle=Documentation 从Windows Azure SDK for PHP http://phpazure.codeplex.com/wikipage?title=Blob%20storage&referringTitle=Documentation
Inspecting the .NET storage client library Microsoft.WindowsAzure.StorageClient.dll you can actually find the built in constants that make up this "well known" account name and key: 检查.NET存储客户端库Microsoft.WindowsAzure.StorageClient.dll,您实际上可以找到组成此“知名”帐户名和密钥的内置常量:
private const string DevstoreAccountName = "devstoreaccount1"; 私有常量字符串DevstoreAccountName =“ devstoreaccount1”; private const string DevstoreAccountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";
私有const字符串DevstoreAccountKey =“ Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq / K1SZFPTOtr / KBHBeksoGMGw ==”;
"Way back when", before CloudStorageAccount.DevelopmentStorageAccount, we used to enter this data our selves when connecting to development storage. 在CloudStorageAccount.DevelopmentStorageAccount之前,“何时返回”在连接到开发存储时,我们自己输入这些数据。 Now Microsoft, for our convenience, have hidden that connection string also as a constant inside of the .dll.
现在,为方便起见,Microsoft将连接字符串也隐藏为.dll中的常量。
private const string DevstoreCredentialInString = "AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="; 私有const字符串DevstoreCredentialInString =“ AccountName = devstoreaccount1; AccountKey = Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq / K1SZFPTOtr / KBHBeksoGMGw ==”;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.