Adrian
Adrian

Reputation: 29

ASP.NET MVC 4, Web API - 404 not found

I know that ASP.NET MVC 4 can't route Web API in Areas (sic!).

I created for testing purposes new "Web API" project (in new solution) in Visual Studio 2012.

But it doesn't work. Default HomeController (Controller) works, but ValuesController (ApiController) is not found (404).

I have installed both VS 2010 and VS 2012.

Any ideas?

Upvotes: 1

Views: 3647

Answers (1)

Martin Devillers
Martin Devillers

Reputation: 18002

ASP.NET MVC 4 can't route Web API in Areas out of the box. However, with a little bit of effort you can make it work: Why are my Area specific Web API’s accessible from all other Areas?

Related blog post with more details here.

Upvotes: 3

Related Questions