【发布时间】:2015-04-01 04:26:04
【问题描述】:
我正在尝试使用以下简单代码创建天蓝色存储。
手动尝试交叉检查工作正常。
static void Main(string[] args)
{
//Parse the connection string and return a reference to the storage account.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
//Create the blob client object.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
//Get a reference to a container to use for the sample code, and create it if it does not exist.
CloudBlobContainer container = blobClient.GetContainerReference("sascontainer");
container.CreateIfNotExists();
}
出现错误:
Microsoft.WindowsAzure.Storage.dll 中出现“Microsoft.WindowsAzure.Storage.StorageException”类型的未处理异常 附加信息:远程服务器返回错误:(407) 需要代理身份验证。
App.config
<appSettings>
<add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=ashuthinks;AccountKey=MYKEY"/>
</appSettings>
【问题讨论】:
-
该错误表明您正坐在代理服务器后面。您需要配置代理设置(很可能在 app.config 文件中)。
-
哪个代理设置:O你能帮我吗?
-
更多帮助请见this。
标签: c# azure azure-storage azure-blob-storage