Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

Why does an HTTPS URL override an HTTP URL when setting up listeners in .NET Core?

$
0
0

Can someone explain why setting an HTTPS URL when building a web app overrides the HTTP settings?

I have the following code which works just fine:

var webApplication = WebApplication.CreateBuilder().Build();webApplication.Urls.Add("http://*:5002");webApplication.RunAsync();

When I use Postman to communicate, I have no trouble finding the web application on port 5002.

But when I add an HTTPS port:

var webApplication = WebApplication.CreateBuilder().Build();webApplication.Urls.Add("http://*:5002");webApplication.Urls.Add("https://*:500");webApplication.RunAsync();

The application stops listening on port 5002 and actively refuses the connection.


Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>