title: Multiple actions matched
body: <p>I have migrated to <code>ASP.NET Core 2.1</code>.I'd like to submit a form (Insert method from ArticleController: url: <a href="http://localhost:52125/article/insert" rel="nofollow noreferrer">http://localhost:52125/article/insert</a>) but I got this error:</p>
  
  <blockquote>
    <p>An unhandled exception occurred while processing the request.
    AmbiguousActionException: Multiple actions matched. The following
    actions matched route data and had all constraints satisfied:</p>
    
    <p>Jahan.Beta.Web.App.Controllers.ArticleController.Insert
    (Jahan.Beta.Web.App)
    Jahan.Beta.Web.App.Controllers.ArticleController.Edit
    (Jahan.Beta.Web.App)
    Jahan.Beta.Web.App.Controllers.ArticleController.DeleteConfirmed
    (Jahan.Beta.Web.App)
    Microsoft.AspNetCore.Mvc.Internal.ActionSelector.SelectBestCandidate(RouteContext
    context, IReadOnlyList candidates)</p>
  </blockquote>
  
  <p>How can I solve it? and is there a way to improve/optimize routes.MapRoute?</p>
  
  <p><strong>Article Controller:</strong></p>
  
  <pre><code>[Route("[controller]")]
  public class ArticleController : Controller
  {
     [HttpPost]
     public async Task&lt;IActionResult&gt; Insert([FromBody]Article article)
     {
        // I want to run this method!
     }
  
     [HttpGet("Edit/{id}")]
     public async Task&lt;IActionResult&gt; Edit(int? id)
     {
     }
     [HttpPost]
     [ValidateAntiForgeryToken]
     public async Task&lt;IActionResult&gt; Edit(int id, [FromBody] Article article)
     {
     }
  
     [HttpPost, ActionName("DeleteConfirmed/{id}")]
     public async Task&lt;IActionResult&gt; DeleteConfirmed(int id)
     {
     }
  }
  </code></pre>
  
  <p><strong>a part of startup.cs file:</strong></p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env)
      {
          app.UseDeveloperExceptionPage();
          app.UseStatusCodePages();
          app.UseStaticFiles();
          app.UseAuthentication();
  
          var provider = new FileExtensionContentTypeProvider();
          provider.Mappings[".less"] = "plain/text";
  
          app.UseStaticFiles(new StaticFileOptions
          {
              ContentTypeProvider = provider
          });
  
          ApplicationDbContext.CreateAdminAccount(app.ApplicationServices, Configuration).Wait();
  
          app.UseMvc(routes =&gt;
          {
              routes.MapRoute(
                  name: "areas",
                  template: "{area:exists}/{controller=Home}/{action=Index}/{id?}"
              );
  
              routes.MapRoute(
                  name: "AdminAreasUsers",
                  template: "{area:exists}/{controller=Users}/{action=Index}/{id?}"
              );
              routes.MapRoute(
                  name: "AdminAreasDeleteUser",
                  template: "{area:exists}/{controller=Users}/{action=Delete}/{id}"
              );
              routes.MapRoute(
                 name: "FilterByTagAsync",
                 template: "{controller}/{action}/{tagId}/{articlePage}",
                 defaults: new { controller = "Article", action = "FilterByTagAsync", tagId = "", articlePage = "" }
             );
              routes.MapRoute(
                 name: "ShowArticle",
                 template: "{controller}/{action}/{Id}",
                 defaults: new { controller = "Article", action = "Show", Id = "" }
             );
  
              routes.MapRoute(
                 name: "default",
                 template: "{controller}/{action}",
                 defaults: new { controller = "Home", action = "Index" }
             );
              routes.MapRoute(
                  name: "About",
                  template: "{Controller=AboutUs}/{action=AboutUs}/{id?}");
  
          });
  
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          else
          {
              app.UseExceptionHandler("/Error");
              app.UseHsts();
          }
      }
  </code></pre>