Use Nuget to find the Web Api Package.
You can do that either by using the Manage Nuget Packages and searching for the Web Api package or use Nuget Package Manager and type
PM> Install-Package Microsoft.AspNet.WebApi
Add WebApiConfig.cs to the App_Start/ folder The config file should contain this.
using System.Web.Http;
namespace WebApplication1
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(config =>
{
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
});
}
}
}
Source : Configuring ASP.NET Web API
Add GlobalConfiguration.Configure(WebApiConfig.Register);
in Application_Start of the Global.asax file.