Hello, we are using Windows Authentication in our application. This works very well. We have only one case where we have some problems. And that is when the user cancels the Windows login window.
Then comes a standard error page with a 401 error.
The URL is then: .../MixedAuth?state=c6ET79UdXtie-799oiesuH64HXRbfAmis-iT_7WVlclD4_KodxO9GDodMUwM9hNDnAeh5Z0CItYeil1jEUd883CmrAQTtfsXx5raNleKJKDDq9DqSvwUHguAjdCAx0vmsxmg79gERbNRt3fYivJuwlXCKcAkuamqNDMxhWSzCW2PCKvEjRSAmA8wIJy7jdWX
Is there any way to pick up this error? We would like to respond to it with a redirect. Possibly via a filter or similar ?
ActionResult result = new ChallengeResult("Windows", Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl,Redirect =true})); The ExternalLoginCallback is unfortunately not called in the Cancel case.
Uwe
1 Answer(s)
-
0
Hi @uabel
Maybe this can help https://stackoverflow.com/a/64467721. If not, you can create an ASP.NET Core exception filter and handle this specific error.