Obviously I am doing somethign wrong. Hence this question.
I have a MVC5 asp.net c# web app.
I have created an Area called 'Admin' in my solutions.
I have added an api controller class to my Controllers folder.
I have added a method inside it.
I have added a route to this method.
When I use a browser (in the actual server) to test this I get an error saying not found.
This is what I type in my browser:
https://my domain/Admin/Plan/List
This is the api class:
[RoutePrefix("Admin")]
public class StripeController : ApiController
{
[HttpGet]
[Route("/Plan/List")]
public string List()
{
//return something
}
}
I have found a similar question on SO here:
but as i can see i have implemented this?
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}