3

I have spent several hours trying to figure out why once I put my instance containing my website behind a load balancer, I keep getting the "Too Many Redirects" error. I have a Windows Server instance behind my load balancer with an SSL certificate on my load balancer. Originally, I had an SSL certificate on my instance because we weren't sure about load balancing yet, and was handling the http -> https redirects on my server with url rewrite. However, now I am getting this error. I have disabled the rewrite rules on my server and yet I'm still getting all my responses with a 307 status. Any help is much appreciated, as I'm almost out of hair to pull out. Also please let me know if you need more information, I just wasn't sure what else to include in the question.

Update

After using Failed Request Tracing, it seems that the module setting the response header to 307 is the "AspNetCoreModuleV2".

  • 1
    I'm in the process of trying to work through a similar issue. Try enabling Failed Request Tracing (google about it and how to install and configure). Maybe it will tell you what is happening. Here's my issue, if it helps at all: https://serverfault.com/questions/1034456/arr-works-for-non-ssl-but-fails-for-ssl?noredirect=1#comment1346089_1034456 – crichavin Sep 22 '20 at 05:10
  • 1
    Also check out this article, it talks about SSL and redirect loops a bit: https://kevinareed.com/2015/11/07/how-to-deploy-anything-in-iis-with-zero-downtime-on-a-single-server/ – crichavin Sep 22 '20 at 16:08

1 Answers1

1

So now I feel really silly, but I figured out what the problem was. Someone had added httpsredirection middleware to the project and I was unaware of it. Once I removed the middleware, it works like a charm. However I wouldn't have figured that out if Chad Richardson hadn't mentioned Failed Request Tracing. Thank you very much!