Top "Attributerouting" questions

Define your routes using attributes on action methods in ASP.

Using ApiControllerAttribute without using RouteAttribute

In ASP.NET Core (v 2.1.5) you can create controllers without having them inherit from Controller class (as you know). And …

c# asp.net-core .net-core asp.net-core-webapi attributerouting
ASP.NET Help Pages default home page?

I want to go to http://myserver and be able to get Help Pages as the default home page, so …

asp.net-mvc-4 asp.net-mvc-areas attributerouting asp.net-web-api-helppages
ASP.Net MVC 4 w/ AttributeRouting and multiple RoutePrefix attributes

TL;DR I need a way to programtically choose which RoutePrefix is chosen when generating URLs based on the properties …

c# asp.net-mvc asp.net-mvc-4 attributerouting
ASP.NET Web API multiple RoutePrefix

The opensource Attribute Routing allows to have multiple route-prefixes. Why does ASP.NET Web API 2.0 does not allow to have …

asp.net-web-api2 asp.net-web-api-routing attributerouting
Multiple controllers with same URL routes but different HTTP methods

I've got a following two controllers: [RoutePrefix("/some-resources") class CreationController : ApiController { [HttpPost, Route] public ... CreateResource(CreateData input) { // ... } } [RoutePrefix("/some-resources") class …

c# asp.net-web-api asp.net-web-api2 asp.net-web-api-routing attributerouting
Web Api Controller in other project, route attribute not working

I have a solution with two projects. One Web Api bootstap project and the other is a class library. The …

c# asp.net-web-api asp.net-web-api2 asp.net-web-api-routing attributerouting
Construct url in view for Web Api with attribute routing

How can I get the url from web api in my view? Example (from the msdn-blog): [RoutePrefix("reviews")] public class …

c# asp.net-mvc asp.net-web-api attributerouting
Using Route instead of RoutePrefix at controller level in .net web api attribute routing

If I decorate this web api controller with the Route attribute I can hit the method [Route("api/v{version}/…

c# asp.net-web-api attributerouting
Requested resource does not support http method "PUT"

I'm using AttributeRouting with my Web API (MVC 4). Why does this work? [AcceptVerbs("PUT")] [PUT("api/v1/tokens/current")] public …

asp.net-web-api attributerouting