title: ASP.NET Web API actions - only one GET per controller?
body: <p>I'm new to ASP.NET Web API but I'm hitting an issue where if I'm trying to add two get methods to a single controller it is failing at trying to get the action. Are we allowed only one get per controller, unless we are adding an overload of the same method?</p>
  
  <p>This works if I only have one get method, e.g. the first one. As soon as I add Get to the second method name, it gives me a 500.</p>
  
  <pre><code>[HttpGet]
  public string GetToday()
  {
      return "Hello today";
  }
  
  [HttpGet]
  public string GetPending()
  {
      return "Hello Pending";
  }
  </code></pre>
  
  <p>The calls I'm making:
  <a href="http://abc.com/api/tasks/gettoday" rel="nofollow">http://abc.com/api/tasks/gettoday</a>
  <a href="http://abc.com/api/tasks/getpending" rel="nofollow">http://abc.com/api/tasks/getpending</a></p>
  
  <p>I can make this call if the method name is just 'Today', as long as I put the [HttpGet] attribute. But only if I don't have the second action. Which means if I remove the [HttpGet] attribute from the second method as well as remove 'Get' from the method name so it is just Pending, then it works.</p>
  
  <p>As soon as there are two get methods I get this error:</p>
  
  <p>{"Message":"An error has occurred.","ExceptionMessage":"Multiple actions were found that match the request: \r\nSystem.String TodaysTasks() on type TaskTrackerService.Controllers.TasksController\r\nSystem.String PendingTasks() on type TaskTrackerService.Controllers.TasksController","ExceptionType":"System.InvalidOperationException","StackTrace":"   at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem.SelectAction(HttpControllerContext controllerContext)\r\n   at System.Web.Http.Controllers.ApiControllerActionSelector.SelectAction(HttpControllerContext controllerContext)\r\n   at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsyncInternal(HttpRequestMessage request, CancellationToken cancellationToken)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)"}</p>