1

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.

svick
  • 236,525
  • 50
  • 385
  • 514
stevo
  • 2,164
  • 4
  • 23
  • 33
  • I believe `"commands"` does not work anymore on RC2 (are you using RC2?). Have you tried `dotnet run --server.urls http://unix:/var/aspnet/HelloMVC/kestrel.sock`? Also make sure your application is set up to accept configuration from the command line. – svick May 23 '16 at 21:18

1 Answers1

3

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.

Community
  • 1
  • 1
svick
  • 236,525
  • 50
  • 385
  • 514