enter code here
我创建了一个类,用于获取创建凭据所需的令牌,然后在使用c#an exception&#34时在azure环境中创建存储帐户;服务器无法验证请求。验证证书是否有效并与此订阅相关联#34;发生。请告诉我如何解决此问题?
public async static Task<string> CreateStorageAccount(SubscriptionCloudCredentials credentials)
{
using (var storageClient = new StorageManagementClient(credentials))
{
await storageClient.StorageAccounts.CreateAsync(
new StorageAccountCreateParameters
{
AccountType = "Standard_GRS",
// AccountType = AccountType.StandardLRS, Location = "West US"
//GeoReplicationEnabled = false,
Label = "Sample Storage Account",
Location = LocationNames.EastAsia,
Name = ConfigurationManager.AppSettings["storageName"]
});
}
return "Successfully created account.";
}
提前致谢