如何改变监听IP地址和端口?在这里找到了答案:https://github.com/aspnet/KestrelHttpSer...
把Program.cs加一行UseUrls代码如下:
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
namespace HelloMvc
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseDefaultHostingConfiguration(args)
.UseIIS()
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}
本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/p/5849838.html,如需转载请自行联系原作者