【发布时间】:2017-07-14 11:30:26
【问题描述】:
当我运行一个 .NET Core Web API 项目时,我得到一个如下所示的 URL:http://localhost:5000/api/...
如何将 URL 的 /api/ 部分更改为其他内容?即 - http://localhost:5000/myservice/...
我使用 Kestrel 作为我的网络主机。
【问题讨论】:
-
这应该是 Startup.cs 中路由配置的一个相当简单的更改。
标签: asp.net-core .net-core asp.net-core-webapi kestrel