Following Microsofts instructions for Enforcing HTTPS in ASP.NET Core and IIS 10 at https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-2.1&tabs=visual-studio
The recommended changes do not appear to have an affect on redirecting http:// navigation to https:// for my site. I see a lot of blog posts reference modifying the web.config file with the rewrite rules. Changing the web.config file is not mentioned in Microsoft's documentation.
I have added this environment variable to the server: ASPNETCORE_HTTPS_PORT
443
And it does not affect the redirection at all.
I have app.UseHttpsRedirection();
in my Startup.cs file.
Is the web.config modification the correct change to make for HTTP to HTTPS redirection?
0 Answers