How to Use HTTPS with Microsoft.AspNet.Server.WebListener

后端 未结 2 513
醉酒成梦
醉酒成梦 2021-01-19 09:28

At the end of this article http://www.asp.net/vnext/overview/aspnet-vnext/create-a-web-api-with-mvc-6 it describes how to host a MVC6 app in a Console app using Microsoft.As

相关标签:
2条回答
  • 2021-01-19 10:14

    For https, the only way I got it to work is adding the following entry into your project.json:

    "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=https://+:12345;
    

    Make sure to install the self signed or a commercially purchased public SSL certificate using:

    netsh http add sslcert
    

    command line tool or using a very nice GUI tool by Steve at http://www.stevestechspot.com/HttpConfigUpdate.aspx. Also, remember to give permissions using:

    netsh add urlacl url=http://+:12345 /yoururl user=Everyone
    
    0 讨论(0)
  • 2021-01-19 10:27

    Semicolon is the delimiter.

    Example:

    "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:12345;http://mydomain.stackoverflow.com:12345"
    
    0 讨论(0)
提交回复
热议问题