You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Function App使用Always Encrypted列搭配Azure Key Vault Provider报错求助

解决方案
  • 升级运行时(优先选择)
    .NET Core 3.1已终止官方支持,将项目升级为Azure Functions v4运行时 + .NET 6/.NET 8 LTS版本可彻底解决依赖兼容问题:
    1. 调整.csproj配置:将<TargetFramework>修改为对应目标版本(如net6.0/net8.0),<AzureFunctionsVersion>修改为v4
    2. 升级所有关联NuGet包到适配新运行时的最新稳定版,包括Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
  • 版本对齐适配(需保留.NET Core 3.1时使用)
    1. 卸载现有Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider,安装适配3.1的1.1.*版本序列
    2. 显式安装3.x版本的Microsoft.Extensions.Logging.Abstractions,避免拉取5.0版本引发加载失败
    3. 保留<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>配置的同时,在.csproj中新增绑定重定向配置:
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
    
  • 切换隔离进程运行模型
    进程内运行模型下宿主与业务代码依赖共享,极易出现版本冲突,切换为隔离进程模型后依赖相互隔离,可避免该类问题。

内容的提问来源于stack exchange,提问作者Klh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.01 14:15:03