For example, I know that sub domain routing is possible with ASP.Net MVC (and likely others) but I'm not sure what it looks like in practical use. I'm trying to integrate my API from a completely separate site into my main site and it needs to stay as api.exampledomain.com because it's consumed by third parties. We also will be using the API for a future mobile app, but I don't care if internal use is routed via exampledomain.com/api/{controller}/etc - I only care that I have existing usage of the API and I want the API to remain under the sub domain we're already using.
I'm looking to merge the sites because I have a monolith, so I've had to do smelly RPC things to clear caches on the main singleton instance when API calls are made and I hate it. We've been migrating from WebForms to MVC/WebAPI for a while and I really want it inside.
In this example, I have a wildcard for the domain - but I'm not sure what the routes would look like in the MVC app or what IIS would be configured like .. anyone had any experience with this?
Also, there doesn't appear to be a standard SubdomainRoute - there's like 500 versions of code floating around StackOverflow. Hasn't anyone nailed that down? Is this just not a common task?