我想在 .NET 应用程序中使用 Always Encrypted SQL 2016 DB 和 Azure Key Vault 来存储加密 key 。到目前为止我一直在关注这篇文章: https://blogs.msdn.microsoft.com/sqlsecurity/2015/11/10/using-the-azure-key-vault-key-store-provider-for-always-encrypted/
但是当我到达文章中提供的这行代码时,我收到异常:
SqlColumnEncryptionAzureKeyVaultProvider azureKeyVaultProvider =
new SqlColumnEncryptionAzureKeyVaultProvider(GetToken);
异常(exception)情况是:
Additional information: Method not found: 'Void Microsoft.Azure.KeyVault.KeyVaultClient..ctor(AuthenticationCallback)'.
我检查了我的引用资料,一切似乎都已就位。 GetToken认证回调方法也在那里。
有人可以帮忙吗?谢谢。
最佳答案
这似乎是最新的 Microsoft.Azure.KeyVault nuget 包的问题。 Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider 包依赖于 Microsoft.Azure.KeyVault v 1.0.0,如果安装最新版本 (v 2.0.6),它会阻止 SqlColumnEncryptionAzureKeyVaultProvider。将 Microsoft.Azure.KeyVault 包降级到 v 1.0.0 就可以了...
关于c# - Azure Key Vault .NET - 找不到方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41118220/