【发布时间】:2016-06-15 04:03:18
【问题描述】:
我们想要创建通用的公共网络服务,并创建定制的 API。 但是如何将这些端点隔离、版本化和绑定为超大规模系统?
我们想要:
https://api.domain.tld/v1/..https://api.domain.tld/v2/..https://api.domain.tld/latest/..https://api.domain.tld/bosch/v1/..
或
https://domain.tld/api/v1/..https://domain.tld/api/v2/..
所有端点都应该被隔离。在 https://domain.tld/api/v2/.. 这样的端点后面至少存在 3 个 ASP.NET WebAPI 实例。我们不想通过 WebAPI 项目中的命名空间来分离版本控制,并使用内部路由配置来解决这个问题。
我们希望在本地和 Azure 上都有这种行为。 是否有任何建议或最佳实践和配置示例?
我在这里只能找到一个帖子(How to version and configure WebApi with multiple aliases),很老,没有答案。
【问题讨论】:
标签: azure iis asp.net-web-api azure-web-app-service