How to set a start route in .NET Core

My main .NET.NET application launch is set as follows:

/api/values

I want to change this launch route as follows:

/

Looking through the documentation, there are many specifications for route restrictions, but I'm not sure I see how to configure the route that starts at startup ...

It calls the wrong controller at startup. If I remove the controller (ValueController), I get 404 ... where is it specified to use this controller at runtime?

I see hope in the hidden launchSettings.json file but edit

http://localhost:5000/api/value

to

http://localhost:5000/

Does not help

+4
source share
2 answers

, Visual Studio.

  • ""
  • Launch URL URL. , URL.

Run URL Setting

+4

Properties/launchSettings.json

:

profiles.IISExpress.launchUrl
+1

Source: https://habr.com/ru/post/1670314/


All Articles