title: 404 - A public action method X was not found on controller Y (ActionInvoker.InvokeAction returns false)
body: <p>This is NOT a duplicate question, and the problem is driving me crazy. I am getting the typical error "A public action method X was not found on controller Y" which returns a <code>404 Not Found</code>. The screenshot gives you a good idea:</p>
  
  <p><img src="https://i.stack.imgur.com/uWE7m.gif" alt="Visual Studio debugging session"></p>
  
  <p><strong>The image shows the debugger paused right before the line that throws the exception is executed</strong> (<code>base.HandleUnknownAction(actionName)</code>). Now, before you jump into conclusions, here's some info:</p>
  
  <ol>
  <li>This was working at some point perfectly well.</li>
  <li>The HTTP verb (<code>GET</code>) should be accepted by the <code>UpdateCart</code> action (see annotations above method signature).</li>
  <li>The parameters sent are irrelevant: the error happens with <code>POST</code>, <code>GET</code> and any combination of parameters.</li>
  <li>Other similar actions in the same controller work well.</li>
  <li>I took the screenshot with <code>UpdateCart</code> marked <code>virtual</code>, but removing <code>virtual</code> makes no difference.</li>
  <li><strong>The screenshot shows that <code>ActionInvoker.InvokeAction(this.ControllerContext, "UpdateCart")</code> returns false</strong>. Not sure why the reflection performed over my controller can't find the method, but it's RIGHT THERE!!</li>
  </ol>
  
  <p>The routes are the default ones and they work, since otherwise I wouldn't have been able to stop the debugger to take the screenshot above. Here's the code from <code>Global.asax.cs</code>:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
      routes.MapRoute(
          "Default", // Route name
          "{controller}/{action}/{id}", // URL with parameters
          new { controller = "Tickets", action = "Index", id = UrlParameter.Optional } 
      );
  
  }
  </code></pre>
  
  <p>Any ideas are greatly appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Ethan Brown's answer below is correct: <code>HttpGet</code> and <code>HttpPost</code> are mutually exclusive. The solution was to replace these attributes with <code>[AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]</code>.</p>