Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable automatic redirect to https iis

I have a problem to solve and despite my efforts I haven't found a solution.

I have a project running on IIS and not using the default ports 80 and 443 for http and https. These ports are used by another environment running on the same machine. I use 8080 and 44307.

But on this environment I have a problem, when I try to access a page via http with port 8080 in the url, I am automatically redirected to https and port 44307.

I don't have a Rewrite URL configured so I don't understand this redirection. This creates several problems at the project level and I would like to have solutions.

like image 418
Alex Planchon Avatar asked Nov 15 '22 04:11

Alex Planchon


1 Answers

This was answered here : https://serverfault.com/questions/502048/iis-7-0-unwanted-automatic-redirect-to-https

IIS don't do that kind of redirection without an extra configuration. It's your app that is doing that.

I tested it on IIS 8, with ASP.Net Core. When I removed app.UseHttpsRedirection() from the Configure method inside Startup.cs, the redirecting stopped, and I could access my site over HTTP

like image 171
ihebiheb Avatar answered Nov 30 '22 22:11

ihebiheb