stevo stevo - 4 months ago 150x
Linux Question

ASP.NET Core 1.0 / Kestrel on Linux is not creating unix socket

I followed the Publish to a Linux Production Environment instruction on the Microsoft ASP.NET website. I use CentOS 7.1.

I copied the following line in the project.json file

"commands": {
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock",

Then I run the following commands

dotnet restore
dotnet run

But the kestrel.sock file is not created.


The "commands" element does not work with dotnet. To configure the URL, you can use either .UseUrls("http://unix:/var/aspnet/HelloMVC/kestrel.sock") in your Main, or set up command line configuration and then run dotnet run --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock.