Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: [MvcAttributeRouting]Value from ActionName attribute not being considered when building routes [1119]

$
0
0
For the below action:

```
[RoutePrefix("Home")]
public class HomeController : Controller
{
[HttpGet("Index")]
[ActionName("Default")]
public ActionResult Index()
{
return View();
}
}
```

the route generated is like below:
config.Routes.MapRoute("routeName", "Home/Index", new { controller = "Home", action = "__Index__" }, new { httpMethod = HttpMethodConstraints[GET] });

__Impact__:
Medium. Users use "Url.Action(actionName)" to generate links.

__Workaround__:
Rename the action to be "Default"

__Expected__: action variable value should be "Default"

__Actual__: action variable value is "Index"
Comments: Fixed: https://aspnetwebstack.codeplex.com/SourceControl/changeset/9708c15685ddf9cca9de80afce5842887e9dcac2

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>