Add WebApplication under "Host" in TOC (#28482)

* Add WebApplication under "Host" in TOC

* Fix typo
pull/28479/head
Stephen Halter 2023-02-23 15:27:25 -08:00 committed by GitHub
parent 11ed9b9ad7
commit 996501bb9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -68,15 +68,15 @@ On startup, an ASP.NET Core app builds a *host*. The host encapsulates all of th
* Dependency injection (DI) services
* Configuration
There are three different hosts:
There are three different hosts capable of running an ASP.NET Core app:
* [.NET WebApplication Host](xref:migration/50-to-60#new-hosting-model), also known as the [Minimal Host](xref:fundamentals/minimal-apis/webapplication)
* [.NET Generic Host](xref:fundamentals/host/generic-host)
* <xref:fundamentals/host/web-host>
* [ASP.NET Core WebApplication](xref:fundamentals/minimal-apis/webapplication), also known as the [Minimal Host](xref:migration/50-to-60#new-hosting-model)
* [.NET Generic Host](xref:fundamentals/host/generic-host) combined with ASP.NET Core's <xref:Microsoft.Extensions.Hosting.GenericHostBuilderExtensions.ConfigureWebHostDefaults%2A>
* [ASP.NET Core WebHost](xref:fundamentals/host/web-host)
The .NET WebApplication Host is recommended and used in all the ASP.NET Core templates. The .NET WebApplication Host and .NET Generic Host share many of the same interfaces and classes. The ASP.NET Core Web Host is available only for backward compatibility.
The ASP.NET Core <xref:Microsoft.AspNetCore.Builder.WebApplication> and <xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder> types are recommended and used in all the ASP.NET Core templates. `WebApplication` behaves similarly to the .NET Generic Host and exposes many of the same interfaces but requires less callbacks to configure. The ASP.NET Core <xref:Microsoft.AspNetCore.WebHost> is available only for backward compatibility.
The following example instantiates a WebApplication Host:
The following example instantiates a `WebApplication`:
[!code-csharp[](~/fundamentals/startup/6.0_samples/WebAll/Program.cs?name=snippet2&highlight=7)]

View File

@ -242,6 +242,8 @@ items:
uid: fundamentals/middleware/extensibility-third-party-container
- name: Host
items:
- name: WebApplication and WebApplicationBuilder
uid: fundamentals/minimal-apis/webapplication
- name: Generic Host
uid: fundamentals/host/generic-host
- name: Web Host