ASP.NET CORE, Web API: No route matches the supplied values

ASP.net core 3 Why this problem occurs: As part of addressing dotnet/aspnetcore#4849, ASP.NET Core MVC trims the suffix Async from action names by default. Starting with ASP.NET Core 3.0, this change affects both routing and link generation. See more: ASP.NET Core 3.0-3.1 | Breaking Changes | Async suffix trimmed from controller action names As @Chris … Read more

How to correctly use Html.ActionLink with ASP.NET MVC 4 Areas

I hate answering my own question, but @Matt Bodily put me on the right track. The @Html.Action method actually invokes a controller and renders the view, so that wouldn’t work to create a snippet of HTML in my case, as this was causing a recursive function call resulting in a StackOverflowException. The @Url.Action(action, controller, { … Read more

Attribute Routing not working in areas

You are probably combining convention based routing with attribute routing, and you should register your areas after you map the attribute routes. The line AreaRegistration.RegisterAllAreas(); should be called AFTER this line: routes.MapMvcAttributeRoutes(); The explanation (from https://devblogs.microsoft.com/aspnet/attribute-routing-in-asp-net-mvc-5/): If you are using both Areas with route attributes, and areas with convention based routes (set by an AreaRegistration … Read more

No type was found that matches the controller named ‘User’

In my case, the controller was defined as: public class DocumentAPI : ApiController { } Changing it to the following worked! public class DocumentAPIController : ApiController { } The class name has to end with Controller! Edit: As @Corey Alix has suggested, please make sure that the controller has a public access modifier; non-public controllers … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)