title: Http.EnumRouteContraint must implement System.Web.Routing.IRouteConstraint
body: <p>I'm using AttributeRouting in my Web API project.  I've installed the AttributeRouting for Web API.  I want to define an Enum route constraint so I setup my AttributeRoutingHttpConfig config as follows:</p>
  
  <pre><code>using System.Reflection;
  using System.Web.Http;
  using AttributeRouting.Web.Http.Constraints;
  using AttributeRouting.Web.Http.WebHost;
  using MyProject.Data.Models;
  
  [assembly: WebActivator.PreApplicationStartMethod(typeof(PhantasyTour.AttributeRoutingHttpConfig), "Start")]
  
  namespace MyProject
  {
      public static class AttributeRoutingHttpConfig
      {
          public static void RegisterRoutes(HttpRouteCollection routes) 
          {    
              routes.MapHttpAttributeRoutes(
                  config =&gt;
                  {
                      config.AddRoutesFromAssembly(Assembly.GetExecutingAssembly());
                      config.InlineRouteConstraints.Add("ListType", typeof(EnumRouteConstraint&lt;ListType&gt;));
                  });
          }
  
          public static void Start() 
          {
              RegisterRoutes(GlobalConfiguration.Configuration.Routes);
          }
      }
  }
  </code></pre>
  
  <p>When I fire up my application I immediately receive the following error:</p>
  
  <p>The constraint "AttributeRouting.Web.Http.Constraints.EnumRouteConstraint`1[[MyProject.Data.Models.ListType, MyProject.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]" must implement System.Web.Routing.IRouteConstraint</p>
  
  <p>I've looked at the source code for the AttributeRouting.Web.Http.Constraints.EnumRouteConstraint and confirmed that it implements IHttpRouteConstraint which presumably is the WebAPI equivalent of IRouteConstraint in the MVC namespace.  </p>
  
  <p>Does anyone know what I'm doing wrong and how I can get this working?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I attempted to create a completely blank Web Application and add only WebAPI and AttributeRouting for WebAPI references.  Despite having absolutely no references to MVC assemblies, I still receive the same error message.  I did discover however that there is another EnumRouteConstraint found in the AttributeRouting.Web.Constraints namespace which works perfectly. It doesn't appear to be MVC specific since it is located in the Core AttributeRouting assembly.   I would love to know why there are two different EnumRouteConstraint classes when only one of them works.  But that is a question for another time.</p>