如何与Microsoft.AspNet.Server.WebListener一起使用HTTPS [英] How to Use HTTPS with Microsoft.AspNet.Server.WebListener

查看:52
本文介绍了如何与Microsoft.AspNet.Server.WebListener一起使用HTTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本文末尾

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.AspNet.Server.WebListener.

如何将https与weblistener一起使用?我尝试从http和https更改project.json "commands": {"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"}中的url,但没有用(尽管我认为这样做可能并不容易)

How can I use https with the weblistener? I tried changing the url in project.json "commands": {"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"} from http and https and that didn't work (although I figured it probably wouldn't be that easy)

--server.urls参数的格式是什么,以允许多个端点(即http和https)?

What is the format for the --server.urls parameter to allow for multiple endpoints (i.e. http and https)?

推荐答案

分号是分隔符.

示例:

"web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:12345;http://mydomain.stackoverflow.com:12345"

这篇关于如何与Microsoft.AspNet.Server.WebListener一起使用HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆