Steven T. Cramer
Steven T. Cramer

Reputation: 1518

Azure infinite redirect loop in Chrome

I have an MVC5 Azure web site which was working fine last night. Now it seems to be stuck in an infinite redirect loop when trying to login via chrome. It works fine from Edge and FireFox. It uses Azure AD for authentication. The redirects are back and forth from the main site to login.microsoftonline.com.

Upvotes: 7

Views: 10898

Answers (2)

Teakay Starwyn
Teakay Starwyn

Reputation: 131

I experienced this issue with one of my Azure web apps which was serving traffic over http.

The solution for me was to disable the affinity cookie.

If I had an app where maintaining user session on 1 server was required I would have to re-enable the affinity cookie, but because that caused me (intermittent) problems I would also force all traffic to https as that seems to be a more successful set up to use with the Affinity cookie.

this link was really helpful and great background info: https://azure.microsoft.com/en-us/blog/disabling-arrs-instance-affinity-in-windows-azure-web-sites/

Upvotes: 2

theadriangreen
theadriangreen

Reputation: 2258

Sometimes, some bad tokens that AAD uses can get cached by the browser. They're used in place of the valid tokens, and not refreshed. Clearing the browser cache (Ctrl-Shift-Delete on Chrome) usually resolves this.

Upvotes: 9

Related Questions