What features of ASP.NET Web API do not already exist in ASP.NET MVC?
Personally I think that you can accomplish the same by using Routing and a Custom Action Result.
Is it just the ability to self host it?
Thank you, Radu
What features of ASP.NET Web API do not already exist in ASP.NET MVC?
Personally I think that you can accomplish the same by using Routing and a Custom Action Result.
Is it just the ability to self host it?
Thank you, Radu
Ad 1. Imagine you are building a mobile app where user should be able to browse and download files from his local PC. You wouldn't want to use ASP.NET MVC to expose services because you cannot assume that the customer has a working IIS installation. You can use Web API though and host HTTP service in a windows service. (and also provide user with an installer that sets up that service).
Ad 2. Leaving abstractions behind means less complicated API, less configuration and richer support for HTTP specific concepts.
ASP.NET MVC is a HTTP stack optimized to server content to web browsers. If your client applications are not web browsers then Web API may turn out to be a more flexible option.