2

I have created a default asp.net core 3 web API with the default wheatherforecast controller.

Then I have added a second controller, let's call it myController.

Now I was wondering how I can change the default startup url so I can call a myController function inside it.

Do I have to work with endpoints route map ? If yes how ?

3
  • 1
    By "default startup" do you mean the URL that is inserted in the browser when the browser launches, or the controller/action that will be executed when you have an empty path? Commented Nov 15, 2019 at 18:28
  • 1
    I mean the browser one Commented Nov 15, 2019 at 18:31
  • Try this out ASP.NET Core Default debugging launch URL Commented Nov 15, 2019 at 18:32

1 Answer 1

10

enter image description here

Go to the Solution Explorer, find launchSettings.json file and modify the "launchUrl" property and set it to whatever you want.

For example in your case: "launchUrl": "myController/myAction",

Sign up to request clarification or add additional context in comments.

1 Comment

Yes it is. My bad I haven't noticed it... but anyway thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.