我关注了 Publish to a Linux Production Environment关于 Microsoft ASP.NET 的说明网站。我使用 CentOS 7.1。
我在 project.json 文件中复制了以下行
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock",
}
然后我运行以下命令
dotnet restore
dotnet run
但是没有创建 kestrel.sock 文件。
最佳答案
"commands"
元素不适用于 dotnet
。 To configure the URL ,您可以在 Main
中使用 .UseUrls("http://unix:/var/aspnet/HelloMVC/kestrel.sock")
,或设置命令行配置,然后运行 dotnet run --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock
。
关于linux - Linux 上的 ASP.NET Core 1.0/Kestrel 未创建 unix 套接字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37382286/