title: ASP.net web api 2 Route-Attribute not working
body: <p>I've the following problem, my route attribute is not working.</p>
  
  <p>I have the following action:</p>
  
  <pre><code>[HttpGet]
  [Route("~api/admin/template/{fileName}")]
  public HttpResponseMessage Template(string fileName)
  {
      return CreateHtmlResponse(fileName);
  }
  </code></pre>
  
  <p>and i want to access the action like <code>.../api/admin/template/login.html</code>, so that Template get <em>login.html</em> passed as the file name.</p>
  
  <p>But i alsways get: <code>No HTTP resource was found that matches the request URI 'http://localhost:50121/api/admin/template/login.html'</code>.</p>
  
  <p>The following request works: <code>/api/admin/template?fileName=login.html</code></p>
  
  <p>Does anyone know, what i am doing wrong with my routing?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>My route configuration</p>
  
  <pre><code>config.Routes.MapHttpRoute(
                      "API Default", "api/{controller}/{action}",
                      new { id = RouteParameter.Optional });
  </code></pre>