How to change the port number for Asp.Net core app?

后端 未结 12 983
误落风尘
误落风尘 2020-12-05 01:34

I added the following section in project.json.

  \"commands\": {
    \"run\": \"run server.urls=http://localhost:8082\",
    \"web\": \"Microsof         


        
12条回答
  •  -上瘾入骨i
    2020-12-05 02:27

    Use following one line of code .UseUrls("http://*:80") in Program.cs

    Thus changing .UseStartup()

    to

    .UseStartup() .UseUrls("http://*:80")

提交回复
热议问题