This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
MVC not honoring attribute route default values for URL matching #4447
Closed
Description
MVC isn't propagating the default values from a URL template. That means that code like:
[HttpGet("/TeamName/{*Name=DefaultName}/")]
public ActionResult GetTeam(string name)
{
}
will match /TeamName
but will always have a default value of null
for name
The fix here to pass routeInfo.Defaults
+ the secret route token.