Closed John0King closed 5 years ago
@shirhatti that's a good idea.
@John0King are you running IIS on 443 or a custom port?
Not sure I understand the ask here. Do you want ANCM to enforce HTTPS redirection?
@Tratcher port 443.
IIS Express with Visual Studio will set ASPNETCORE_HTTPS_PORT
environment variable (so the default template work) , but running on IIS do not have this environment variable.
The ASP.NET Core Module that responsible for managing the lifetime of the dotnet.exe process (and capable of setting environment variables) doesn't have access to the binding information. While it's trivial to set the environment variable, we can make no guarantees that an HTTPS binding exists in IIS for the same hostname that the HTTP request was received on.
@jkotalik You got any thoughts on this?
Yeah I don't think there is a good way to reliably redirect to Https with IIS easily.
Then I think the default template created by visualstudio need to change, it should not only work for dev environment.
Will ANCM automatice set
ASPNETCORE_HTTPS_PORT
environment variable ?