Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Windows Auth / 401 Error #11407


User avatar
0
uabel created

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)