title: ASP.NET CORE, Web API: No route matches the supplied values
body: <p><strong>PLEASE NOTE: This question was asked in 2016. The original answer to this problem was to update the microsoft api versiong package. In the current days, the problem reoccurs, but for other reasons.</strong></p>
  
  <p>Original Question:</p>
  
  <hr>
  
  <p>i have some problems with the routing in asp.net core (web api).</p>
  
  <p>I have this Controller (simplified):</p>
  
  <pre><code>[ApiVersion("1.0")]
  [Route("api/v{version:apiVersion}/[Controller]")]
  public class DocumentController : Controller
  {
  
  [HttpGet("{guid}", Name = "GetDocument")]
  public IActionResult GetByGuid(string guid)
  {
      var doc = DocumentDataProvider.Find(guid);
      if (doc == null)
          return NotFound();
  
      return new ObjectResult(doc) {StatusCode = 200};
  }
  
  
  [HttpPost]
  public IActionResult Create([FromBody] Document doc)
  {
      //... Creating Doc
  
      // Does not work   
      var val = CreatedAtRoute("GetDocument", new {guid = doc.Guid.ToString("N")}, document);
  
      // or this: 
      CreatedAtRoute("GetDocument", new { controller = "Document", guid = doc.Guid.ToString("N")}, document);
      // neither this
      var val = CreatedAtRoute("GetDocument", new { version = "1", controller = "Document", guid = doc.Guid.ToString("N")}, document);
  
      return val;
  }
  }
  </code></pre>
  
  <p>If i call Create, the document is created and the routing object was created but i get the error "No route matches the supplied values" and get a 500 status.</p>
  
  <p>I can call the GetByGuid directly, without any problems.</p>
  
  <p>I couldn't find any debugging help for asp.net core (like any existing routing debugger). </p>
  
  <p>I would appreciate any help!</p>
  
  <p><strong><em>EDIT</em></strong>
  Looks like it would be a bug from microsoft's versioning package.. if i define the fix route /api/v1/[Controller] it's working.</p>
  
  <p>But that's not a solution for me.</p>