Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Created Unassigned: Provide better error messages when invalid route templates are provided. [1118]

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

For the above route template definitions, currently the errors are like folowing:

1. The route URL separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.
Parameter name: routeUrl

2. The route URL separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.
Parameter name: routeUrl

__Impact__:
Low. User experience is effected. Since there is a possibility that the user's application could be having many controllers, it could get difficult to find the controller/action where this issue is occurring.

__Proposal__:
Better error message showing the controller/action information too, so that users can easily figure out where the problem is.

Viewing all articles
Browse latest Browse all 7925

Trending Articles



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