title: MVC5 Controller no action found using Route Attribute
body: <p>I have the following MVC Controller:</p>
  
  <pre><code>[RoutePrefix("api/SystemCheck")]
  public class SystemCheckController : ApiController
  {
      [HttpGet]
      [Route("")]
      [Route("EnvironmentValidate")]
      [RequiresPrivilegeMVC((int)PrivilegeType.SystemCheck)]
      public IEnumerable&lt;EnvironmentValidation&gt; Get()
      {
          return FilteredEnvironmentValidate();
      }
  </code></pre>
  
  <p>I want to be able to access it these two ways:</p>
  
  <ol>
  <li><a href="http://localhost/Perform/API/SystemCheck/EnvironmentValidate" rel="nofollow noreferrer">http://localhost/Perform/API/SystemCheck/EnvironmentValidate</a></li>
  <li><a href="http://localhost/Perform/API/SystemCheck/" rel="nofollow noreferrer">http://localhost/Perform/API/SystemCheck/</a></li>
  </ol>
  
  <p>When I try option 2 I get a valid response. However, when I try option 1 I get:</p>
  
  <p><em>{
    "Message": "No HTTP resource was found that matches the request URI '<a href="http://localhost/Perform/API/SystemCheck/EnvironmentValidate" rel="nofollow noreferrer">http://localhost/Perform/API/SystemCheck/EnvironmentValidate</a>'.",
    "MessageDetail": "No action was found on the controller 'SystemCheck' that matches the name 'EnvironmentValidate'."
  }</em></p>
  
  <p>Is it not finding my controller action because the method name is called <code>Get</code> but the route is specifying it as "EnvironmentValidate"?</p>
  
  <p>Here is how I have configured my RouteConfig.cs:</p>
  
  <pre><code>public class RouteConfig
  {
      public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
          routes.MapMvcAttributeRoutes();
  
          routes.MapHttpRoute(
              name: "DefaultApiGet",
              routeTemplate: "api/{controller}/{action}",
              defaults: new { action = "Get" },
              constraints: new { httpMethod = new HttpMethodConstraint("GET") }
          );
  </code></pre>
  
  <p>Any ideas of what I'm missing?</p>
  
  <p>Thanks,</p>