I tried to start a nancyfx webserver in self hosting mode. Everything works fine when executing the following code:
public static void Main(string[] args)
{
var hostConfig = new HostConfiguration
{
UrlReservations = new UrlReservations
{
CreateAutomatically = true
},
};
var host = new NancyHost(hostConfig, new Uri("http://localhost:8081"));
host.Start();
Console.ReadLine();
host.Stop();
}
However, when I change the uri to https://...
the server starts but every connection opened by the browser is instantly closed and the browser displays "The website is not available". The connection is even closed before the browser would close the connection due to a timeout.
I am running the application with .NET 4.5 on Windows. Using netstat -a I can tell that the right port is opened.
Am I missing something? Thanks for your help.