使用 IdentityServer4-当我们停止 VM2 时,登录进程成功地从 VM2 重定向到 VM1。但是,相反的情况(从 VM1 到 VM2)不会发生

问题描述 投票:0回答:0

我的 Web 应用程序托管在 Azure 上的两个虚拟机上,并且我在基础设施级别上安装了应用程序网关。当我通过 VM2 登录应用程序并登录后,我停止了 VM2 的服务器。用户不受影响,请求重定向到 VM1,一切正常。现在,当我通过 VM1 登录时,并且在我停止 VM1 服务器时登录后,用户会强制从应用程序注销,并将我重定向到 VM2 的应用程序登录页面。当我输入凭据并单击登录按钮时。应用程序继续加载,我在 api 响应中收到 401 状态代码。 我在我的应用程序代码中实现了数据保护,我也在使用 IdentityServer4 并且我检查了显示此错误的日志:

2023-05-18 09:34:14,587 [138] ERROR [IdentityModel.AspNetCore.OAuth2Introspection.OAuth2IntrospectionHandler] [Error returned from introspection endpoint: Not Found] - Error returned from introspection endpoint: Not Found
 2023-05-18 09:34:14,588 [138] INFO [IdentityModel.AspNetCore.OAuth2Introspection.OAuth2IntrospectionHandler] [BearerIdentityServerAuthenticationIntrospection was not authenticated. Failure message: Error returned from introspection endpoint: Not Found] - BearerIdentityServerAuthenticationIntrospection was not authenticated. Failure message: Error returned from introspection endpoint: Not Found 

可能是什么问题?从 VM2 到 VM1 的流程工作正常。但是反向流动不起作用。

我已经从日志中的声明中打印了 subjectId、用户的电子邮件,但是我在日志中得到了 subjectId 和电子邮件的空值。

.net azure server virtual-machine identityserver4
© www.soinside.com 2019 - 2024. All rights reserved.