The two methods which are used to add constraints to a route is By using regular expressions. And by using an object that implements IRouteConstraint Interface.
The two methods which are used to add constraints to a route is