Skip to Main Content
Microsoft .NET Framework 4.5 Quickstart Cookbook
book

Microsoft .NET Framework 4.5 Quickstart Cookbook

by Jose Luis Latorre
May 2013
Intermediate to advanced content levelIntermediate to advanced
226 pages
4h 16m
English
Packt Publishing
Content preview from Microsoft .NET Framework 4.5 Quickstart Cookbook

Setting up a self-hosted ASP.NET web API

In this recipe, we will demonstrate how to self-host an ASP.NET web API. A web API gives us the flexibility to host our web API in our process, also called self-hosting.

Getting ready

In order to use this recipe you should have Visual Studio 2012 and ASP.NET MVC 4 installed (the latter includes the ASP.NET Web API).

How to do it...

Next we are going to self-host our web API.

  1. Create a new console application project and name it WebAPISelfHosted.
  2. Open the NuGet package manager, which you can launch from the Tools menu, select Library Package Manager, and click on Manage NuGet Packages for Solution.
  3. Select the online packages, and look for Microsoft ASP.NET Web API Self Host and click on Install as shown in the following ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET Core 2.0 By Example

.NET Core 2.0 By Example

Neha Shrivastava, Rishabh Verma
Introducing .NET 4.5

Introducing .NET 4.5

Alex Mackey, William Tulloch, Mahesh Krishnan
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek
Microsoft® .NET Compact Framework (Core Reference)

Microsoft® .NET Compact Framework (Core Reference)

Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton

Publisher Resources

ISBN: 9781849686983Other