title: Custom routes not being hit in Web API
body: <p>I have the following action in my controller within my Web API project.</p>
  
  <pre><code> [System.Web.Http.RoutePrefix("api/Events")]
  public class EventsController : ApiController
  {
      [System.Web.Http.HttpGet]
      [System.Web.Http.Route("Images/{title}/{id}/{photoName}")]
      public HttpResponseMessage GetImage(string title, Guid id, string photoName)
      {
          var path = $"c:\\Photos\\{title}\\{id}\\{photoName}";
          HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
          var stream = new FileStream(path, FileMode.Open, FileAccess.Read);
          result.Content = new StreamContent(stream);
          result.Content.Headers.ContentType =
              new MediaTypeHeaderValue("application/octet-stream");
          return result;
      }
  }
  </code></pre>
  
  <p>Here is my <code>WebApiConfig</code> class.</p>
  
  <pre><code>public static void Register(HttpConfiguration config)
      {
          // Web API configuration and services
  
          // Web API routes
          config.MapHttpAttributeRoutes();
  
          config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
      }
  </code></pre>
  
  <p>I have set a breakpoint in this action of mine. The problem, the breakpoint is not being hit.</p>
  
  <p>Here is the URL I am using:</p>
  
  <blockquote>
    <p><a href="http://localhost:52584/api/Events/Images/Test_Title/80b88b32-0e45-4b8f-9a63-61ee28bd11fd/Test.jpg" rel="nofollow noreferrer">http://localhost:52584/api/Events/Images/Test_Title/80b88b32-0e45-4b8f-9a63-61ee28bd11fd/Test.jpg</a></p>
  </blockquote>
  
  <p>Is there a possibility that the breakpoint does not get hit, because I am passing the .jpg extension?</p>