0
我的密钥保管库位于北欧地区。使用下面的代码访问密码时。我间歇性地收到404错误。它正在早上和晚上工作,但在中午404错误即将到来。它与任何流量问题有关吗?从后面的代码访问时,Azure密钥保险库秘密URL返回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;