My ASP.NET core app startup route is set as:
/api/values
I want to change this startup route to be:
/
Looking through the documentation there is lots of specification on route constraints but I'm not sure I see how to set the route that gets run on startup...
It's calling the wrong controller on startup. If I remove the controller (ValueController), I get a 404. Where is it specified to use this controller at runtime?
I'm seeing hope in the hidden launchSettings.json but editing
http://localhost:5000/api/value
to
http://localhost:5000/
does not help
It's in Properties/launchSettings.json
the field to change is:
profiles.IISExpress.launchUrl
来源:https://stackoverflow.com/questions/42350067/how-to-set-startup-route-in-asp-net-core