You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
rynowak
changed the title
MVC not honoring attribute route default values
MVC not honoring attribute route default values for URL matching
Apr 11, 2016
See: https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Core/Internal/AttributeRoute.cs#L14
MVC isn't propagating the default values from a URL template. That means that code like:
will match
/TeamName
but will always have a default value ofnull
forname
The fix here to pass
routeInfo.Defaults
+ the secret route token.The text was updated successfully, but these errors were encountered: