unosquare / embedio

A tiny, cross-platform, module based web server for .NET
http://unosquare.github.io/embedio
Other
1.46k stars 176 forks source link

How can I create a https connection #500

Closed ghiboz closed 2 years ago

ghiboz commented 3 years ago

hi all! I'm trying to create an https connection: following the samples I get this code:

            var options = new WebServerOptions("https://192.168.0.30:5555");
            options.AutoLoadCertificate = true;
            options.Mode = HttpListenerMode.EmbedIO;

            http = new WebServer(options);
            http.RegisterModule(new WebApiModule());
            http.RegisterModule(new StaticFilesModule(wwwPath.Text));

and when the server starts I get this:

How can I make a ssl certificate? and how can I set the cert to the webserver options?

NOTE: I will use my app in a 'local' server, not a public server thanks in advance

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

rdeago commented 3 years ago

Hello @ghiboz, sorry for the late answer.

I'm no SSL expert at all, but a simple search can help you with the creation of a self-signed certificate. Sorry for not being of more help; maybe @geoperez can shed more light on the subject.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.