从后面的代码访问时,Azure Key Vault Secret URL返回404错误;

时间:2017-07-07 12:49:38

标签: azure azure-keyvault

我的钥匙保险库托管在北欧地区。使用以下代码访问秘密时。我间歇性地收到404错误。它在早上和晚上工作,但在中午404错误即将来临。它与任何流量问题有关吗?

Dictionary<string, object> dictCredentials =  _dataManager.LoadAzureVaultCredentials(this._storageKey);

this._azureADApplicationClientID =  dictCredentials["Azure_AD_Application_Client_ID"].ToString();
this._azureADCertiicateThumprint =  dictCredentials["Azure_Certificate_Thumprint"].ToString();
this._keyVaultUrl = dictCredentials["Key_Vault_Url"].ToString(); 
int.TryParse(dictCredentials["Max_Azure_Retry_Attempts"].ToString(), out this._maxAzureRetryAttempts);
int.TryParse(dictCredentials["Azure_Retry_Attempts"].ToString(), out this._azureRetryAttempts); this.GetCert();

var kvConnectionString = new KeyVaultClient(new  KeyVaultClient.AuthenticationCallback(GetToken));

var retryPolicy = new RetryPolicy<ServerErrorDetectionStrategy(this._maxAzureRetryAttempts,TimeSpan.FromSeconds(this._azureRetryAttempts));
kvConnectionString.SetRetryPolicy(retryPolicy);

this._storageConnectionString = kvConnectionString.GetSecretAsync(this._keyVaultUrl).Result.Value;

1 个答案:

答案 0 :(得分:0)

如果您知道代码在一天中的某些时间有效,则不太可能与您的代码相关 - 在门户网站中打开支持请求或推特@AzureSupport,他们可以更深入地进行潜水。