I want to use my asp.net mvc application with multiple domains (maybe of hundreds),
so I have created custom Route class that matches requests including domain.
Each domain could has different routes, so the number of routes in RouteTable can be huge
(eg 500 domains, each 20 routes = 10000 routes in RouteTable).
I am considering how it will be efficient?
I have an idea to replace RouteTable.Routes (of type RouteCollection)
with custom one (of type Dictionary<string, RouteCollection>).
But how I can override default route matching mechanism with my custom mechanism which will be two step:
1) retrieve RouteCollection from dictionary based on domain name
2) retrieve specyfic Route object (standard route matching mechanism)
How can I do this?
Maybe someone has better idea for solving this problem?
Thanks in advance
View Complete Post