如何在ASP.NET WebForms(Azure AD)应用程序中修复IDX21323

发布于 2025-01-19 09:23:52 字数 605 浏览 3 评论 0 原文

每次用户登录(通过Azure Active Directory)每天首次登录系统,系统都会将用户重定向到以下方式:

IDX21323:需求是'System.Boolean'。 openIDConnectProtocolValidationContext.nonce是null,openIDConnectProtocol.validatedIdtoken.payload.nonce并非无效。 nonce无法验证。如果您不需要检查NONCE,请将OpenIDConnectProtocolValidator.requirenonce设置为“ false”。请注意,如果发现“ nonce”将进行评估

我已经尝试使用这些,但似乎这些解决方案仅适用于ASP.NET MVC

Every time when a user signs in (via Azure Active Directory) for the first time everyday the system redirect the users to this:

IDX21323: RequireNonce is 'System.Boolean'. OpenIdConnectProtocolValidationContext.Nonce was null, OpenIdConnectProtocol.ValidatedIdToken.Payload.Nonce was not null. The nonce cannot be validated. If you don't need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to 'false'. Note if a 'nonce' is found it will be evaluated

I have tried the using these solutions but it seems like these solutions are only for ASP.NET MVC

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尾戒 2025-01-26 09:23:52

几年前,我收到了一个类似的问题,我通过在global.aspx.cs文件中定义一个空session_start方法来解决

void Session_Start(object sender, EventArgs e)
{
     // place holder to solve endless loop issue
}

您可以阅读有关此解决方法的更多详细信息的信息:

https://github.com/identityserver/indistityserver/indistityserver/indistityserver3/542#issuecomment--suecomment-745798842

https://github.com/aspnet/aspnet/aspnet/aspnetkatana/aspnetkatana/saspnetkatana/saspnetkatana/70#issuecocomment-3466868684444444444444444444444444444444444444444444444444444444444444444444年

I got a similar issue couple of years back which I'd resolved by defining an empty Session_Start method in Global.aspx.cs file

void Session_Start(object sender, EventArgs e)
{
     // place holder to solve endless loop issue
}

You can read about this workaround's more details at following github threads:

https://github.com/IdentityServer/IdentityServer3/issues/542#issuecomment-74579842

https://github.com/aspnet/AspNetKatana/issues/70#issuecomment-346853448

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文