Search code examples
asp.net-mvc-3asp.net-web-apiappfabric

Missing reference setting up Web API with MVC3


I'm trying to follow these instructions for building with ASP.NET Web API and MVC 3, but am running into a problem around Step 4 tring to add this line:

routes.Add(new ServiceRoute("api/contacts", new HttpServiceHostFactory(), typeof(ContactsApi)));

The issue seems to be around the HttpServiceHostFactory; I don't have the proper reference. The related namespace is Microsoft.ApplicationServer, which I cannot find on my machine at all. I've installed AppFabric to no avail. Any idea where I can find this, and why it wasn't installed along with Web API?


Solution

  • Heh. Found the answer - grabbed the wrong NuGet package. When searching through the packages, "WebApi.All" never showed, both other webApi packages did. Had more success using the Package Manager Console and typing in Install-Package WebApi.All -Version 0.6.0. Soooo... nevermind.