我們正在使用azure密鑰保管庫來保護我們的azure存儲blob加密。 This是我遵循的教程,以使其發揮作用。對於某些項目,Windows Azure密鑰保管庫廣告身份驗證失敗
我開發了一個示例應用程序和用於加密blob的包裝庫。它在示例應用程序中運行良好。但在引用包裝項目後的實際軟件,當應用程序請求發生異常的原因,
private async Task<string> GetToken(string authority, string resource, string scope)
{
var authContext = new AuthenticationContext(authority);
ClientCredential clientCred = new ClientCredential(ADClientID, ADClientSecret);
AuthenticationResult result = await authContext.AcquireTokenAsync(resource, clientCred);
if (result == null)
throw new InvalidOperationException("Failed to obtain the JWT token");
return result.AccessToken;
}
在上面的代碼在該行
var authContext = new AuthenticationContext(authority);
返回唯一的例外是
InnerException = {"Couldn't find type for class Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35."}
我在做什麼錯了?
http://stackoverflow.com/questions/20885343/how-to-solve-windows-azure-diagnostic-runtime-error-could-not-create-windowsazu/20910827#20910827。它有幫助嗎? – RazvanR