Tutorials ASP.NET Core Web API Tutorial
ASP.NET Core Out of Process Hosting Model — Complete Guide
ASP.NET Core Out of Process Hosting Model — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of ASP.NET Core Web API Tutorial on Toolliyo Academy.
On this page
ASP.NET Core Web API Tutorial · Lesson 24 of 175
ASP.NET Core Out of Process Hosting Model
Beginner → Intermediate → Advanced → Professional
Beginner · 1 — Setup & foundations · ~6 min · Module 2: Web API Basics
What is this?
Out-of-process hosting runs Kestrel as a separate process. IIS acts as reverse proxy forwarding requests to localhost port.
Why should you care?
Older templates and Linux containers typically use Kestrel directly — same idea as out-of-process behind IIS.
See it live — copy this example
Create a Web API (dotnet new webapi), paste the example, run dotnet run, test in Swagger.
// web.config (published)
<aspNetCore processPath="dotnet" arguments=".\ShopNest.API.dll" hostingModel="OutOfProcess" />
Run Example »
This lesson uses terminal or setup steps. Run commands on your computer — the live editor appears on coding lessons.
What happened?
- Two processes: IIS + Kestrel.
- Slightly more overhead but isolates crashes and matches container deploys.
Try it yourself
- Read the real-world section and name which part of ShopNest.API uses this topic.
- Run dotnet run and test the endpoint in Swagger UI or curl.
- Change one value in the example (route, DTO field, or status code) and predict what will happen before you save.
- Change a route URL or DTO property and save — test again in Swagger or curl.
- Return the wrong status code on purpose (404 instead of 200) and see what the client shows.