Search code examples
asp.net-coreiis.net-coreasp.net-core-webapi.net-5

WebApi Deployed to IIS: Error: Exceeded maxRedirects. Probably stuck in a redirect loop


I have two Api's that are deployed and running fine in my local IIS. They deploy fine and swagger works but executing any method returns a TypeError: Failed to fetch Error. Then I run the same GET in Postman and it throws Error: Exceeded maxRedirects. Probably stuck in a redirect loop

Has anyone seen this before? We are going through an Azure App Gateway...could that be a problem?

-Ken


Solution

  • The Azure Gateway turned out to be the problem. I commented out the app.UseHttpsRedirection() and the problems went away.