Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Core Default debugging launch URL

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 change it?

like image 490
Blake Mumford Avatar asked May 02 '15 12:05

Blake Mumford


People also ask

How do I change the startup controller in .NET Core?

1 Answer. Show activity on this post. Go to the Solution Explorer, find launchSettings. json file and modify the "launchUrl" property and set it to whatever you want.

How do I debug a .NET Core application?

Open the Debug view by selecting the Debugging icon on the left side menu. Select the green arrow at the top of the pane, next to . NET Core Launch (console). Other ways to start the program in debugging mode are by pressing F5 or choosing Run > Start Debugging from the menu.

What is the default Aspnetcore_environment?

Production is the default value if DOTNET_ENVIRONMENT and ASPNETCORE_ENVIRONMENT have not been set. Apps deployed to Azure are Production by default. To set the environment in an Azure App Service app by using the portal: Select the app from the App Services page.

What is UseEndpoints in ASP.NET Core?

UseEndpoints adds endpoint execution to the middleware pipeline. It runs the delegate associated with the selected endpoint.


1 Answers

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.

like image 87
Blake Mumford Avatar answered Sep 27 '22 20:09

Blake Mumford