From the course: Advanced ASP.NET Web API 2.2

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Self-hosting

Self-hosting

From the course: Advanced ASP.NET Web API 2.2

Start my 1-month free trial

Self-hosting

- [Instructor] Other than hosting Web API apps in IIS, we can host the Web API as a separate process than ASP.NET. This means that we can host the Web API in a console app, a Windows service, or OWIN, or any other process that is managed by the .NET framework. On this part we will learn about hosting it in a console app. So let us go to Visual Studio and see this in action. Before you create anything in here make sure that you are running Visual Studio as an administrator. Then next let us go and create a console application. So right-click on Solution, go to Add, add New Project. Choose Windows Desktop from the left, and then Console App. We are going to name this app SimpleClient, then click the OK button to create this app. Next let us install the necessary library which is the Self-Host library. So for that go to the Package Manager console. From the Default project, make sure that you have selected the…

Contents