MVC HTTPS redirection when behind a load balancer
问题 I'm using MVC5 in some IIS servers on Amazon EC2, behind a Amazon Elastic Load Balancer. IIS servers runs only HTTP protocol, and ELB converts to HTTPS. IIS server doesn't know if user is accessing thru HTTPS, so I have a rewrite rule checking "X-Forwarded-Proto" header to redirect user to HTTPS. Unfortunately, when a login is required, MVC/IIS redirects user to a logon page in HTTP . If I check my website in a tool like http://www.redirect-checker.org/ I get these type of results: http:/