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

添加Front Door并扩容Azure App Service后出现.NET 5认证错误:Unable to unprotect the message.State

Azure App Service多实例+Front Door部署下OIDC认证出现“Unable to unprotect the message.State”错误

我们的环境是Linux版Azure App Service,采用Microsoft Identity实现基于Azure AD的OIDC认证。数月前服务运行正常,但在添加Front Door并将App Service扩容至3个实例后,出现了Unable to unprotect the message.State错误。

错误触发场景与表现

用户访问页面时,页面会自动重定向至Azure AD登录流程,此时触发该错误;但奇怪的是,刷新页面1-2次后就能正常完成登录。

已做的配置与排查尝试

  • 当前配置:使用Redis作为DataProtection密钥存储(startup.cs配置截图如下)
    startup.cs配置
  • 已参考官方文档尝试多种DataProtection共享存储方案:
    • Azure Blob存储(含/不含Azure Key Vault加密)
    • 数据库存储
    • Redis存储
  • 已开启Front Door及App Service的会话亲和性

想请教:有没有开发者在使用DataProtection后遇到过这类多实例+Front Door场景下的认证错误?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.03 10:16:09