ASP.NET Core Default debugging launch URL

后端 未结 1 579
有刺的猬
有刺的猬 2020-12-10 10:17

When using the ASP.NET Core Web API template, the default debugging start up URL is somehow set to api/values. Where is this default configured and how do I cha

相关标签:
1条回答
  • 2020-12-10 10:50

    There was very little documentation that I could find regarding where this start up URL was declared. There is a brief mention of it in this blog post on MSDN. I eventually stumbled upon it in the launchSettings.json file under the Properties node of the project as shown below:

    enter image description here

    Here are the contents of this file:

    {
      "profiles": {
        "IIS Express": {
          "commandName" : "IISExpress",
          "launchBrowser": true,
          "launchUrl": "api/values",
          "environmentVariables" : {
            "ASPNET_ENV": "Development"
          }
        }
      }
    }
    

    You can change the launchURL to your desired default route.

    0 讨论(0)
提交回复
热议问题