Is there anyway that I can use 2 try-all parameters in one same RouteBase?
ie: I currently have route : “media/{*key}” which is a customised route that grab media file from S3
for SEO purpose: I need to set up another route “media/{*key}/{*name}” which pointing to the same S3 resource as above, but having a name append at the end
Currently I created a customized “StorageServiceRoute” in handling the routing.
However
var innerRoute = new Route(_routeUrl, this);
is not capable having 2 try-catch in _routURL (“media/{*key}/{*name}”), and I having error as below:
A catch-all parameter can only appear as the last segment of the route
URL.
is there any good way of handling this in routing? thanks in advance!
You could write a custom route:
which could be registered in
Global.asax: