I am using default ASP.NET Core 3.1 Web API app where I have configured it for https and using app.UseHttpsRedirection(); as well.
Now I am hosting this as a Windows service using this nuget package: Microsoft.Extensions.Hosting.WindowsServices.
Hosting is done but I am getting the API result using http, but it's causing an error while trying to use https like https://localhost:5001/weatherforecast
Can I create some self signed certificate like IIS and assign it and can run as https?