We’ve covered a vast amount of ground so far in this book. We’ve gone over the basic mechanics of building an ASP.NET Core application, such as configuring dependency injection, loading app settings, and building a middleware pipeline. We’ve looked at the UI side, using Razor templates and layouts to build an HTML response. And we’ve looked at higher-level abstractions, such as EF Core and ASP.NET Core Identity, that let you interact with a database and add users to your application. In this chapter we’re taking a slightly different route. Instead of looking at ways to build bigger and better applications, we’ll focus on what it means to deploy your application so that users can access it.
We’ll start by looking again at the ASP.NET Core hosting model in section 16.1 and examining why you might want to host your application behind a reverse proxy instead of exposing your app directly to the internet. I’ll show you the difference between running an ASP.NET Core app in development using dotnet
run
and publishing the app for use on a remote server. Finally, I’ll describe some of the options available to you when deciding how and where to deploy your app.