Azure Web 应用程序无法访问 Key Vault,因为:调用者正在使用较旧的 TLS 版本对 Key Vault 进行身份验证。KeyVault 服务不再接受 TLS 1.0。
问题已解决。
对于我的本地运行,我默认启用了 Tls 1.2:https://learn.microsoft.com/en-us/azure/active-directory/hybrid/connect/reference-connect-tls-enforcement#powershell-启用 tls-12 的脚本
对于 web 应用程序,问题出在 web.config 中的 httpRuntime 中。至少应为 4.6.1
<system.web>
<compilation debug="false" targetFramework="4.7.1"/>
<httpCookies requireSSL="true"/>
<httpRuntime targetFramework="4.5" maxRequestLength="5000"/>
</system.web>