title: Submitting a form in ASP.NET Core 2 and getting an error "Sending Data Status Code: 404; Not Found"
body: <p>I've tried submit a simple <code>Form</code> but I got this error:</p>
  
  <blockquote>
    <p>"Sending Data Status Code: 404; Not Found"</p>
  </blockquote>
  
  <p>I've used <code>ASP.NET Core 2</code> and I'm new in it!</p>
  
  <p>How can I solve this problem?</p>
  
  <p>a part of Startup class:</p>
  
  <pre><code> routes.MapRoute(
                  name: "ForTest",
                  template: "{controller}/{action}/{des}",
                  defaults: new { controller = "Comment", action = "Test", des = "no comment!" }
              );
  </code></pre>
  
  <p>a part of cshtml file:</p>
  
  <pre><code>&lt;form method="post" asp-controller="Comment" asp-action="Test"  enctype="multipart/form-data"&gt;
      &lt;div class="form-group"&gt;
        &lt;textarea id="des" class="form-control" rows="3"&gt;&lt;/textarea&gt;
      &lt;/div&gt;
      &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>a part of CommentController class:</p>
  
  <pre><code>[Route("[controller]")]
  public class CommentController : Controller
  {
      private readonly ApplicationDbContext _context;
  
      public CommentController(ApplicationDbContext context)
      {
          _context = context;
      }
  
      [HttpPost]
      [Route("Test/{des}")]
      [ValidateAntiForgeryToken]
      public IActionResult Test(string des)
      {
          return null;
      }
  }
  </code></pre>