【问题标题】:ASP.NET Core 1.0 / Kestrel on Linux is not creating unix socketLinux 上的 ASP.NET Core 1.0 / Kestrel 未创建 unix 套接字
【发布时间】:2016-05-23 03:36:39
【问题描述】:

我按照Microsoft ASP.NET 网站上的Publish to a Linux Production Environment 说明进行操作。我使用 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" 不再适用于 RC2(您使用的是 RC2 吗?)。你试过dotnet run --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock吗?还要确保您的应用程序设置为接受来自命令行的配置。

标签: linux sockets asp.net-core-mvc .net-core coreclr


【解决方案1】:

"commands" 元素不适用于dotnetTo configure the URL,您可以在Main 中使用.UseUrls("http://unix:/var/aspnet/HelloMVC/kestrel.sock"),或者设置命令行配置然后运行dotnet run --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-10
    • 2016-11-13
    • 1970-01-01
    • 2020-03-09
    • 1970-01-01
    • 2013-12-25
    相关资源
    最近更新 更多