我在project.json
中添加了以下部分。
"commands": {
"run": "run server.urls=http://localhost:8082",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:8082",
"weblistener": "Microsoft.AspNet.Hosting --server WebListener --server.urls http://localhost:8082"
},
不过,当使用 dotnet myapp.dll
运行时它仍然显示 "现在侦听于: http://localhost:5000"?
顺便问一句,其他机器的客户端能够访问该服务吗?
"commands"
属性不再被dotnet
使用,这就解释了为什么它不起作用。 - svick