Now that ASP.Net Core has been released I feel it's time to ask this question.
For my web application, I need to use a WebListener server due a business requirement for self-hosting and NTLM authentication for Windows IDs. The Weblistener server needs an SSL Certificate.
I have generated a SSL certificate and know that for Kestrel it is pulled up in the code of the web server (in Program.cs or Startup.cs). But what is the equivalent way to do that for Weblistener?
I found this post: How to Use HTTPS with Microsoft.AspNet.Server.WebListener but it was never truly answered. A couple hours of Googling didn't turn up anything either for me.
From what I can tell it is some kind of command like:
netsh http add sslcert
But I am in over my head in terms of what I need to do for Weblistener specifically. If possible, I'd love to pull in the certificate using code similar to Kestrel in the startup sequence (it's so convenient!), but I am pretty sure I need to install it with the command line.
Thank you very much in advance!
答案 0 :(得分:0)
正如davidfowl所说,文章https://weblog.west-wind.com/posts/2013/sep/23/hosting-signalr-under-sslhttps确实概述了所需的过程并对其进行了解释。它提到SignalR而不是WebListener,但程序是相同的。
进一步研究是否需要不使用IIS(因为业务要求不允许安装IIS,因为您使用WebListener时可能会这样)Powershell是生成自签名证书的好方法或者您也可以使用MMC获取证书。