Default route at startup with ASP.NET Core [duplicate]
Default route at startup with ASP.NET Core [duplicate]
This question already has an answer here:
With a brand new ASP.NET Core API application, how do you set the default route to navigate to when F5 debugging? I have the SPA being served correctly but every time the application is started with Visual Studio, it defaults to https://localhost:44323/api/values
https://localhost:44323/api/values
There appears to be nowhere in Visual Studio to configure this. In previous versions of ASP.NET this was an option under project properties.
(The /api/values
route being the route of the default controller setup by the template.)
/api/values
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1 Answer
1
Am unsure if launchsettings.json
is still a thing in the latest, but in the versions 1.+ i have used, have done the following. Go to src -> you_web_project -> properties ->launchSettings.json
and edit the file.
launchsettings.json
src -> you_web_project -> properties ->launchSettings.json
Depending upon what you are using as your debugger which could be iis express or the .net command line, edit the settings under launchUrl
(might be applicationUrl
for the default iisExpress) and you should be good to go.
launchUrl
applicationUrl
Go to the project properties, Debug tab, look to the right of the checkbox that is labelled "Launch browser:" Hiding in plain sight.
– JamieMeyer
Jun 30 at 1:46