2016-03-28 14 views
1

Sana lacivert içinde storageUri parametre geçirmek nasıl lütfen bana yardımcı olabilir lacivert üzerinde çalışıyorum. İşteNasıl depolama Uri parametre geçirmek için?

onlar parametre storageuri geçmesine nasıl dosyasını, 5 parametreler credientials, blob, sıraya tabloya sahip? kodunun altına kontrol ediniz. Aşağıdaki gibi

enter code here 
     Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount = null; 
     string AccountName = RoleEnvironment.GetConfigurationSettingValue("AccountName"); 
     string AccountKey = RoleEnvironment.GetConfigurationSettingValue("AccountKey"); 
     StorageCredentialsAccountAndKey credentials = new StorageCredentialsAccountAndKey(AccountName, AccountKey); 
     storageAccount = new Microsoft.WindowsAzure.Storage.CloudStorageAccount(credentials, 
                   new StorageUri(), 
                   new StorageUri("https://{0}.queue.core.windows.net"), 
                   new StorageUri("https://{0}.table.core.windows.net"), 
                   new StorageUri("https://{0}.table.core.windows.net")); 
+0

bu depolama URI parametrelerini geçirmek istediğiniz bir neden var mı? Sorunuzun itibaren, standart depolama uç noktaları bağlanıyorsanız görünüyor. storageuri parametreyi –

+0

evet yardım için teşekkürler – stpdevi

cevap

1

deneyin şey:

 var credentials = new StorageCredentials(accountName, accountKey); 
     CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, 
      new StorageUri(new Uri(string.Format("https://{0}.blob.core.windows.net", accountName))), 
      new StorageUri(new Uri(string.Format("https://{0}.queue.core.windows.net", accountName))), 
      new StorageUri(new Uri(string.Format("https://{0}.table.core.windows.net", accountName))), 
      new StorageUri(new Uri(string.Format("https://{0}.file.core.windows.net", accountName))) 
      ); 
+0

nasıl geçirileceği onun ihtiyacı bitiş noktası bana yardım edebilir bunun için bu yüzden biz geçen zaman "DefaultEndpointsProtocol = https biz StorageCredentialsAccountAndKey veya StorageCredentials gelen accntnt adını ve anahtarı geçiyoruz yüzden bazı sorunlar yaşıyoruz – stpdevi

İlgili konular