From 41db000690124a8fe125fce760ae7c10a2ffa88d Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 21 Sep 2018 13:13:37 -0500 Subject: [PATCH 1/5] In-process hosting model coverage Link fix --- .../servers/aspnet-core-module.md | 88 +++++++- .../_static/ancm-inprocess.png | Bin 0 -> 14314 bytes .../{ancm.png => ancm-outofprocess.png} | Bin aspnetcore/fundamentals/servers/index.md | 32 ++- .../host-and-deploy/aspnet-core-module.md | 200 +++++++++++++++++- aspnetcore/host-and-deploy/iis/index.md | 30 ++- 6 files changed, 326 insertions(+), 24 deletions(-) create mode 100644 aspnetcore/fundamentals/servers/aspnet-core-module/_static/ancm-inprocess.png rename aspnetcore/fundamentals/servers/aspnet-core-module/_static/{ancm.png => ancm-outofprocess.png} (100%) diff --git a/aspnetcore/fundamentals/servers/aspnet-core-module.md b/aspnetcore/fundamentals/servers/aspnet-core-module.md index af8754848d3b..9292cb6bb49a 100644 --- a/aspnetcore/fundamentals/servers/aspnet-core-module.md +++ b/aspnetcore/fundamentals/servers/aspnet-core-module.md @@ -4,31 +4,96 @@ author: rick-anderson description: Learn how the ASP.NET Core Module allows the Kestrel web server to use IIS or IIS Express as a reverse proxy server. ms.author: tdykstra ms.custom: mvc -ms.date: 02/23/2018 +ms.date: 09/21/2018 uid: fundamentals/servers/aspnet-core-module --- # ASP.NET Core Module -By [Tom Dykstra](https://github.com/tdykstra), [Rick Strahl](https://github.com/RickStrahl), and [Chris Ross](https://github.com/Tratcher) +By [Tom Dykstra](https://github.com/tdykstra), [Rick Strahl](https://github.com/RickStrahl), and [Chris Ross](https://github.com/Tratcher) + +::: moniker range=">= aspnetcore-2.2" + +The ASP.NET Core Module allows ASP.NET Core apps to run in an IIS worker process (*in-process*) or behind IIS in a reverse proxy configuration (*out-of-process*). IIS provides advanced web app security and manageability features. + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" The ASP.NET Core Module allows ASP.NET Core apps to run behind IIS in a reverse proxy configuration. IIS provides advanced web app security and manageability features. +::: moniker-end + Supported Windows versions: * Windows 7 or later * Windows Server 2008 R2 or later -The ASP.NET Core Module only works with Kestrel. The module is incompatible with [HTTP.sys](xref:fundamentals/servers/httpsys) (formerly called [WebListener](xref:fundamentals/servers/weblistener)). +::: moniker range=">= aspnetcore-2.2" + +When hosting out-of-process, the module only works with Kestrel. The module is incompatible with [HTTP.sys](xref:fundamentals/servers/httpsys) (formerly called [WebListener](xref:fundamentals/servers/weblistener)). + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + +The module only works with Kestrel. The module is incompatible with [HTTP.sys](xref:fundamentals/servers/httpsys) (formerly called [WebListener](xref:fundamentals/servers/weblistener)). + +::: moniker-end ## ASP.NET Core Module description -The ASP.NET Core Module is a native IIS module that plugs into the IIS pipeline to redirect web requests to backend ASP.NET Core apps. Many native modules, such as Windows Authentication, remain active. To learn more about IIS modules active with the module, see [IIS modules](xref:host-and-deploy/iis/modules). +::: moniker range=">= aspnetcore-2.2" + +The ASP.NET Core Module is a native IIS module that plugs into the IIS pipeline to either: + +* Host an ASP.NET Core app inside of the IIS worker process (`w3wp.exe`), called the [in-process hosting model](#in-process-hosting-model). + +* Redirect web requests to a backend ASP.NET Core app running the [Kestrel server](xref:fundamentals/servers/kestrel), called the [out-of-process hosting model](#out-of-process-hosting-model). + +### In-process hosting model + +Using in-process hosting, an ASP.NET Core app runs in the same process as its IIS worker process. This removes the performance penalty of proxying requests over the loopback adapter when using the out-of-process hosting model. IIS handles process management with the [Windows Process Activation Service (WAS)](/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was). + +The ASP.NET Core Module: + +* Performs app initialization. + * Loads the [CoreCLR](/dotnet/standard/glossary#coreclr). + * Calls `Program.Main`. +* Handles the lifetime of the IIS native request. + +The following diagram illustrates the relationship between IIS, the ASP.NET Core Module, and an app hosted in-process: + +![ASP.NET Core Module](aspnet-core-module/_static/ancm-inprocess.png) + +A request arrives from the web to the kernel-mode HTTP.sys driver. The driver routes the request to IIS on the website's configured port, usually 80 (HTTP) or 443 (HTTPS). The module manages the native request context and converts it into a managed request for a custom implementation, `IISHttpServer`. + +After `IISHttpServer` picks up the request, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. + +### Out-of-process hosting model + +Because ASP.NET Core apps run in a process separate from the IIS worker process, the module handles process management. The module starts the process for the ASP.NET Core app when the first request arrives and restarts the app if it crashes. This is essentially the same behavior as seen with apps that run in-process that are managed by the [Windows Process Activation Service (WAS)](/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was). + +The following diagram illustrates the relationship between IIS, the ASP.NET Core Module, and an app hosted out-of-process: + +![ASP.NET Core Module](aspnet-core-module/_static/ancm-outofprocess.png) + +Requests arrive from the web to the kernel-mode HTTP.sys driver. The driver routes the requests to IIS on the website's configured port, usually 80 (HTTP) or 443 (HTTPS). The module forwards the requests to Kestrel on a random port for the app, which isn't port 80/443. + +The module specifies the port via an environment variable at startup, and the IIS Integration Middleware configures the server to listen on `http://localhost:{port}`. Additional checks are performed, and requests that don't originate from the module are rejected. The module doesn't support HTTPS forwarding, so requests are forwarded over HTTP even if received by IIS over HTTPS. + +After Kestrel picks up the request from the module, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + +The ASP.NET Core Module is a native IIS module that plugs into the IIS pipeline to redirect web requests to backend ASP.NET Core apps. Because ASP.NET Core apps run in a process separate from the IIS worker process, the module also handles process management. The module starts the process for the ASP.NET Core app when the first request arrives and restarts the app if it crashes. This is essentially the same behavior as seen with ASP.NET 4.x apps that run in-process in IIS that are managed by the [Windows Process Activation Service (WAS)](/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was). -The following diagram illustrates the relationship between IIS, the ASP.NET Core Module, and ASP.NET Core apps: +The following diagram illustrates the relationship between IIS, the ASP.NET Core Module, and an app: -![ASP.NET Core Module](aspnet-core-module/_static/ancm.png) +![ASP.NET Core Module](aspnet-core-module/_static/ancm-outofprocess.png) Requests arrive from the web to the kernel-mode HTTP.sys driver. The driver routes the requests to IIS on the website's configured port, usually 80 (HTTP) or 443 (HTTPS). The module forwards the requests to Kestrel on a random port for the app, which isn't port 80/443. @@ -36,6 +101,10 @@ The module specifies the port via an environment variable at startup, and the II After Kestrel picks up a request from the module, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. +::: moniker-end + +Many native modules, such as Windows Authentication, remain active. To learn more about IIS modules active with the module, see . + The ASP.NET Core Module has a few other functions. The module can: * Set environment variables for the worker process. @@ -44,10 +113,11 @@ The ASP.NET Core Module has a few other functions. The module can: ## How to install and use the ASP.NET Core Module -For detailed instructions on how to install and use the ASP.NET Core Module, see [Host on Windows with IIS](xref:host-and-deploy/iis/index). For information on configuring the module, see the [ASP.NET Core Module configuration reference](xref:host-and-deploy/aspnet-core-module). +For detailed instructions on how to install and use the ASP.NET Core Module, see . For information on configuring the module, see the . ## Additional resources -* [Host on Windows with IIS](xref:host-and-deploy/iis/index) -* [ASP.NET Core Module configuration reference](xref:host-and-deploy/aspnet-core-module) +* +* * [ASP.NET Core Module GitHub repository (source code)](https://github.com/aspnet/AspNetCoreModule) +* diff --git a/aspnetcore/fundamentals/servers/aspnet-core-module/_static/ancm-inprocess.png b/aspnetcore/fundamentals/servers/aspnet-core-module/_static/ancm-inprocess.png new file mode 100644 index 0000000000000000000000000000000000000000..d98ed6cfc0a9c73592413dd7497279df12b8f919 GIT binary patch literal 14314 zcmZ{Kby!tj(Dju@x=}(xLRz|!OG$S~3DOPH-7O{3-QC?KUDDFsrF8RdfA91D_kH)l zbG-Z9Q!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Qv z@Skb38EI4p3H%1QkjQ}sOUKz=yZW14Zhf{4<~u(-KCrBUA|asy`RAK=6ajF7j22er z>@Am>Rlr$$&E>!)j0GO@ZuD~PRh)rNB|wJKr7yi63H%S_cMfYn9-_cEfDKeGqZk}l zmtU;@X;`hX4TSuSJoOARyn_5;JzugZ02$lqe#F6BAd=D*%*jgVav)TcBV;Q@8`rCz zmA-ySu}bLlg@(|Hawzn2{=+{RY?2}2{e?ei3H{KAnIFAjnUzM(Cs!ITKnJ9r1s1+k zz%3VTgu|!`#t>N$%0eQ>mh;?>XGD&_IKK>>1llC*GP?P11vt{X4FAH2Y$sta#15jM zssfp8mE?cR$Vn(C5Elf&T+=6dh>BJW4*#GH$7?|ul8sug0BV+y02Vj25he0~ANV`@ z$AYN+fLvV^ohSg>&o)CF-5@xMKB{3Lva3xX0t6mhs3!BgG)nF(pkpak5-auLQz-@9 ztS#pmrPxCV7okji;EzouL!e5D&DQn%1BALjB?5w(UE@bI%#?g34A2Qs*tTyM5}w}1 zQ^H&zAk@kzmJGGO. -ASP.NET Core ships two server implementations: +ASP.NET Core ships three server implementations: + +::: moniker range=">= aspnetcore-2.2" * [Kestrel](xref:fundamentals/servers/kestrel) is the default, cross-platform HTTP server for ASP.NET Core. +* `IISHttpServer` is used with the [in-process hosting model](xref:fundamentals/servers/aspnet-core-module#in-process-hosting-model) and the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) on Windows. * [HTTP.sys](xref:fundamentals/servers/httpsys) is a Windows-only HTTP server based on the [HTTP.sys kernel driver and HTTP Server API](https://msdn.microsoft.com/library/windows/desktop/aa364510.aspx). (HTTP.sys is called [WebListener](xref:fundamentals/servers/weblistener) in ASP.NET Core 1.x.) +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + +* [Kestrel](xref:fundamentals/servers/kestrel) is the default, cross-platform HTTP server for ASP.NET Core. +* [HTTP.sys](xref:fundamentals/servers/httpsys) is a Windows-only HTTP server based on the [HTTP.sys kernel driver and HTTP Server API](https://msdn.microsoft.com/library/windows/desktop/aa364510.aspx). (HTTP.sys is called [WebListener](xref:fundamentals/servers/weblistener) in ASP.NET Core 1.x.) + +::: moniker-end + ## Kestrel Kestrel is the default web server included in ASP.NET Core project templates. @@ -54,7 +66,19 @@ IIS, Nginx, and Apache can't be used without Kestrel or a [custom server impleme ### IIS with Kestrel -When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture) or [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview) as a reverse proxy for ASP.NET Core, the ASP.NET Core app runs in a process separate from the IIS worker process. In the IIS process, the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) coordinates the reverse proxy relationship. The primary functions of the ASP.NET Core Module are to start the ASP.NET Core app, restart the app when it crashes, and forward HTTP traffic to the app. For more information, see [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module). +::: moniker range=">= aspnetcore-2.2" + +When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture), the ASP.NET Core app either runs in the same process as the IIS worker process (the *in-process* hosting model) or in a process separate from the IIS worker process (the *out-of-process* hosting model). When using [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview), the app always runs with the in-process hosting model. + +The [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) is a native IIS module that handles native IIS requests between either the in-process IIS Http Server or the out-of-process Kestrel server. For more information, see . + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + +When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture) or [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview) as a reverse proxy for ASP.NET Core, the ASP.NET Core app runs in a process separate from the IIS worker process. In the IIS process, the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) coordinates the reverse proxy relationship. The primary functions of the ASP.NET Core Module are to start the ASP.NET Core app, restart the app when it crashes, and forward HTTP traffic to the app. For more information, see . + +::: moniker-end ### Nginx with Kestrel diff --git a/aspnetcore/host-and-deploy/aspnet-core-module.md b/aspnetcore/host-and-deploy/aspnet-core-module.md index 90104e9f9e9f..047117aa7426 100644 --- a/aspnetcore/host-and-deploy/aspnet-core-module.md +++ b/aspnetcore/host-and-deploy/aspnet-core-module.md @@ -4,7 +4,7 @@ author: guardrex description: Learn how to configure the ASP.NET Core Module for hosting ASP.NET Core apps. ms.author: riande ms.custom: mvc -ms.date: 02/15/2018 +ms.date: 09/21/2018 uid: host-and-deploy/aspnet-core-module --- # ASP.NET Core Module configuration reference @@ -13,12 +13,97 @@ By [Luke Latham](https://github.com/guardrex), [Rick Anderson](https://twitter.c This document provides instructions on how to configure the ASP.NET Core Module for hosting ASP.NET Core apps. For an introduction to the ASP.NET Core Module and installation instructions, see the [ASP.NET Core Module overview](xref:fundamentals/servers/aspnet-core-module). +::: moniker range=">= aspnetcore-2.2" + +## Hosting model + +For apps running on .NET Core 2.2 or later, the module supports an in-process hosting model for improved performance compared to reverse-proxy (out-of-process) hosting. For more information, see . + +In-procsess hosting is opt-in, but [dotnet new](/dotnet/core/tools/dotnet-new) templates default to the in-process hosting model for all IIS Express scenarios. + +To configure an app for in-process hosting, add the `` property to the app's project file with a value of `inprocess` (out-of-process hosting is set with `outofprocess`): + +```xml + + inprocess + +``` + +The following characteristics apply when hosting in-process: + +* The [Kestrel server](xref:fundamentals/servers/kestrel) isn't used. A custom implementation, `IISHttpServer` acts as the app's server. + +* The [requestTimeout attribute](#attributes-of-the-aspnetcore-element) doesn't apply to in-process hosting. + +* Sharing an app pool among apps isn't supported. Use one app pool per app. + +* When using [Web Deploy](/iis/publish/using-web-deploy/introduction-to-web-deploy) or manually placing an [app_offline.htm file in the deployment](xref:host-and-deploy/iis/index#locked-deployment-files), the app might not shut down immediately if there's an open connection. For example, a websocket connection may delay app shut down. + +* The architecture (bitness) of the app and installed runtime (x64 or x86) must match the architecture of the app pool. + +* If setting up the app's host manually with `WebHostBuilder` (not using [CreateDefaultBuilder](xref:fundamentals/host/web-host#set-up-a-host)) and the app is ever run directly on the Kestrel server (self-hosted), call `UseKestrel` before calling `UseIISIntegration`. If the order is reversed, the host fails to start. + +* Don't use to set the content root with . See the [Content Root](#content-root) section for details. + +### Hosting model changes + +If the `hostingModel` setting is changed in the *web.config* file (explained in the [Configuration with web.config](#configuration-with-webconfig) section), the module recycles the worker process for IIS. + +For IIS Express, the module doesn't recycle the worker process but instead triggers a graceful shutdown of the current IIS Express process. The next request to the app spawns a new IIS Express process. + +### Content root + +When running an app in-process, the current directory reported by is *C:\\Windows\\System32\\inetsrv\\*. To set the content root, use [AppDomain.CurrentDomain.BaseDirectory](xref:System.AppDomain.BaseDirectory*) with : + +```csharp +public class Program +{ + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseContentRoot(AppDomain.CurrentDomain.BaseDirectory) + .UseStartup(); +} +``` + +### Process name + +`Process.GetCurrentProcess().ProcessName` reports either `w3wp` (in-process) or `dotnet` (out-of-process). + +::: moniker-end + ## Configuration with web.config The ASP.NET Core Module is configured with the `aspNetCore` section of the `system.webServer` node in the site's *web.config* file. The following *web.config* file is published for a [framework-dependent deployment](/dotnet/articles/core/deploying/#framework-dependent-deployments-fdd) and configures the ASP.NET Core Module to handle site requests: +::: moniker range=">= aspnetcore-2.2" + +```xml + + + + + + + + + +``` + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + ```xml @@ -34,8 +119,31 @@ The following *web.config* file is published for a [framework-dependent deployme ``` +::: moniker-end + The following *web.config* is published for a [self-contained deployment](/dotnet/articles/core/deploying/#self-contained-deployments-scd): +::: moniker range=">= aspnetcore-2.2" + +```xml + + + + + + + + + +``` + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + ```xml @@ -50,22 +158,25 @@ The following *web.config* is published for a [self-contained deployment](/dotne ``` +::: moniker-end + When an app is deployed to [Azure App Service](https://azure.microsoft.com/services/app-service/), the `stdoutLogFile` path is set to `\\?\%home%\LogFiles\stdout`. The path saves stdout logs to the *LogFiles* folder, which is a location automatically created by the service. See [Sub-application configuration](xref:host-and-deploy/iis/index#sub-application-configuration) for an important note pertaining to the configuration of *web.config* files in sub-apps. ### Attributes of the aspNetCore element -::: moniker range="<= aspnetcore-2.0" +::: moniker range=">= aspnetcore-2.2" | Attribute | Description | Default | | --------- | ----------- | :-----: | | `arguments` |

Optional string attribute.

Arguments to the executable specified in **processPath**.

| | -| `disableStartUpErrorPage` | true or false.

If true, the **502.5 - Process Failure** page is suppressed, and the 502 status code page configured in the *web.config* takes precedence.

| `false` | -| `forwardWindowsAuthToken` | true or false.

If true, the token is forwarded to the child process listening on %ASPNETCORE_PORT% as a header 'MS-ASPNETCORE-WINAUTHTOKEN' per request. It's the responsibility of that process to call CloseHandle on this token per request.

| `true` | +| `disableStartUpErrorPage` |

Optional Boolean attribute.

If true, the **502.5 - Process Failure** page is suppressed, and the 502 status code page configured in the *web.config* takes precedence.

| `false` | +| `forwardWindowsAuthToken` |

Optional Boolean attribute.

If true, the token is forwarded to the child process listening on %ASPNETCORE_PORT% as a header 'MS-ASPNETCORE-WINAUTHTOKEN' per request. It's the responsibility of that process to call CloseHandle on this token per request.

| `true` | +| `hostingModel` |

Optional string attribute.

Specifies the hosting model as in-process (`inprocess`) or out-of-process (`outofprocess`).

| `outofprocess` | | `processPath` |

Required string attribute.

Path to the executable that launches a process listening for HTTP requests. Relative paths are supported. If the path begins with `.`, the path is considered to be relative to the site root.

| | | `rapidFailsPerMinute` |

Optional integer attribute.

Specifies the number of times the process specified in **processPath** is allowed to crash per minute. If this limit is exceeded, the module stops launching the process for the remainder of the minute.

| `10` | -| `requestTimeout` |

Optional timespan attribute.

Specifies the duration for which the ASP.NET Core Module waits for a response from the process listening on %ASPNETCORE_PORT%.

In versions of the ASP.NET Core Module that shipped with the release of ASP.NET Core 2.0 or earlier, the `requestTimeout` must be specified in whole minutes only, otherwise it defaults to 2 minutes.

| `00:02:00` | +| `requestTimeout` |

Optional timespan attribute.

Specifies the duration for which the ASP.NET Core Module waits for a response from the process listening on %ASPNETCORE_PORT%.

In versions of the ASP.NET Core Module that shipped with the release of ASP.NET Core 2.1 or later, the `requestTimeout` is specified in hours, minutes, and seconds.

Doesn't apply to in-process hosting. For in-process hosting, the module waits for the app to process the request.

| `00:02:00` | | `shutdownTimeLimit` |

Optional integer attribute.

Duration in seconds that the module waits for the executable to gracefully shutdown when the *app_offline.htm* file is detected.

| `10` | | `startupTimeLimit` |

Optional integer attribute.

Duration in seconds that the module waits for the executable to start a process listening on the port. If this time limit is exceeded, the module kills the process. The module attempts to relaunch the process when it receives a new request and continues to attempt to restart the process on subsequent incoming requests unless the app fails to start **rapidFailsPerMinute** number of times in the last rolling minute.

| `120` | | `stdoutLogEnabled` |

Optional Boolean attribute.

If true, **stdout** and **stderr** for the process specified in **processPath** are redirected to the file specified in **stdoutLogFile**.

| `false` | @@ -73,13 +184,13 @@ See [Sub-application configuration](xref:host-and-deploy/iis/index#sub-applicati ::: moniker-end -::: moniker range=">= aspnetcore-2.1" +::: moniker range="= aspnetcore-2.1" | Attribute | Description | Default | | --------- | ----------- | :-----: | | `arguments` |

Optional string attribute.

Arguments to the executable specified in **processPath**.

| | -| `disableStartUpErrorPage` | true or false.

If true, the **502.5 - Process Failure** page is suppressed, and the 502 status code page configured in the *web.config* takes precedence.

| `false` | -| `forwardWindowsAuthToken` | true or false.

If true, the token is forwarded to the child process listening on %ASPNETCORE_PORT% as a header 'MS-ASPNETCORE-WINAUTHTOKEN' per request. It's the responsibility of that process to call CloseHandle on this token per request.

| `true` | +| `disableStartUpErrorPage` |

Optional Boolean attribute.

If true, the **502.5 - Process Failure** page is suppressed, and the 502 status code page configured in the *web.config* takes precedence.

| `false` | +| `forwardWindowsAuthToken` |

Optional Boolean attribute.

If true, the token is forwarded to the child process listening on %ASPNETCORE_PORT% as a header 'MS-ASPNETCORE-WINAUTHTOKEN' per request. It's the responsibility of that process to call CloseHandle on this token per request.

| `true` | | `processPath` |

Required string attribute.

Path to the executable that launches a process listening for HTTP requests. Relative paths are supported. If the path begins with `.`, the path is considered to be relative to the site root.

| | | `rapidFailsPerMinute` |

Optional integer attribute.

Specifies the number of times the process specified in **processPath** is allowed to crash per minute. If this limit is exceeded, the module stops launching the process for the remainder of the minute.

| `10` | | `requestTimeout` |

Optional timespan attribute.

Specifies the duration for which the ASP.NET Core Module waits for a response from the process listening on %ASPNETCORE_PORT%.

In versions of the ASP.NET Core Module that shipped with the release of ASP.NET Core 2.1 or later, the `requestTimeout` is specified in hours, minutes, and seconds.

| `00:02:00` | @@ -90,12 +201,48 @@ See [Sub-application configuration](xref:host-and-deploy/iis/index#sub-applicati ::: moniker-end +::: moniker range="<= aspnetcore-2.0" + +| Attribute | Description | Default | +| --------- | ----------- | :-----: | +| `arguments` |

Optional string attribute.

Arguments to the executable specified in **processPath**.

| | +| `disableStartUpErrorPage` |

Optional Boolean attribute.

If true, the **502.5 - Process Failure** page is suppressed, and the 502 status code page configured in the *web.config* takes precedence.

| `false` | +| `forwardWindowsAuthToken` |

Optional Boolean attribute.

If true, the token is forwarded to the child process listening on %ASPNETCORE_PORT% as a header 'MS-ASPNETCORE-WINAUTHTOKEN' per request. It's the responsibility of that process to call CloseHandle on this token per request.

| `true` | +| `processPath` |

Required string attribute.

Path to the executable that launches a process listening for HTTP requests. Relative paths are supported. If the path begins with `.`, the path is considered to be relative to the site root.

| | +| `rapidFailsPerMinute` |

Optional integer attribute.

Specifies the number of times the process specified in **processPath** is allowed to crash per minute. If this limit is exceeded, the module stops launching the process for the remainder of the minute.

| `10` | +| `requestTimeout` |

Optional timespan attribute.

Specifies the duration for which the ASP.NET Core Module waits for a response from the process listening on %ASPNETCORE_PORT%.

In versions of the ASP.NET Core Module that shipped with the release of ASP.NET Core 2.0 or earlier, the `requestTimeout` must be specified in whole minutes only, otherwise it defaults to 2 minutes.

| `00:02:00` | +| `shutdownTimeLimit` |

Optional integer attribute.

Duration in seconds that the module waits for the executable to gracefully shutdown when the *app_offline.htm* file is detected.

| `10` | +| `startupTimeLimit` |

Optional integer attribute.

Duration in seconds that the module waits for the executable to start a process listening on the port. If this time limit is exceeded, the module kills the process. The module attempts to relaunch the process when it receives a new request and continues to attempt to restart the process on subsequent incoming requests unless the app fails to start **rapidFailsPerMinute** number of times in the last rolling minute.

| `120` | +| `stdoutLogEnabled` |

Optional Boolean attribute.

If true, **stdout** and **stderr** for the process specified in **processPath** are redirected to the file specified in **stdoutLogFile**.

| `false` | +| `stdoutLogFile` |

Optional string attribute.

Specifies the relative or absolute file path for which **stdout** and **stderr** from the process specified in **processPath** are logged. Relative paths are relative to the root of the site. Any path starting with `.` are relative to the site root and all other paths are treated as absolute paths. Any folders provided in the path must exist in order for the module to create the log file. Using underscore delimiters, a timestamp, process ID, and file extension (*.log*) are added to the last segment of the **stdoutLogFile** path. If `.\logs\stdout` is supplied as a value, an example stdout log is saved as *stdout_20180205194132_1934.log* in the *logs* folder when saved on 2/5/2018 at 19:41:32 with a process ID of 1934.

| `aspnetcore-stdout` | + +::: moniker-end + ### Setting environment variables Environment variables can be specified for the process in the `processPath` attribute. Specify an environment variable with the `environmentVariable` child element of an `environmentVariables` collection element. Environment variables set in this section take precedence over system environment variables. The following example sets two environment variables. `ASPNETCORE_ENVIRONMENT` configures the app's environment to `Development`. A developer may temporarily set this value in the *web.config* file in order to force the [Developer Exception Page](xref:fundamentals/error-handling) to load when debugging an app exception. `CONFIG_DIR` is an example of a user-defined environment variable, where the developer has written code that reads the value on startup to form a path for loading the app's configuration file. +::: moniker range=">= aspnetcore-2.2" + +```xml + + + + + + +``` + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + ```xml ``` +::: moniker-end + > [!WARNING] > Only set the `ASPNETCORE_ENVIRONMENT` envirnonment variable to `Development` on staging and testing servers that aren't accessible to untrusted networks, such as the Internet. @@ -117,8 +266,20 @@ If a file with the name *app_offline.htm* is detected in the root directory of a While the *app_offline.htm* file is present, the ASP.NET Core Module responds to requests by sending back the contents of the *app_offline.htm* file. When the *app_offline.htm* file is removed, the next request starts the app. +::: moniker range=">= aspnetcore-2.2" + +When using the out-of-process hosting model, the app might not shut down immediately if there's an open connection. For example, a websocket connection may delay app shut down. + +::: moniker-end + ## Start-up error page +::: moniker range=">= aspnetcore-2.2" + +*Only applies to out-of-process hosting.* + +::: moniker-end + If the ASP.NET Core Module fails to launch the backend process or the backend process starts but fails to listen on the configured port, a *502.5 Process Failure* status code page appears. To suppress this page and revert to the default IIS 502 status code page, use the `disableStartUpErrorPage` attribute. For more information on configuring custom error messages, see [HTTP Errors ``](/iis/configuration/system.webServer/httpErrors/). ![502.5 Process Failure Status Code Page](aspnet-core-module/_static/ANCM-502_5.png) @@ -135,6 +296,21 @@ A timestamp and file extension are added automatically when the log file is crea The following sample `aspNetCore` element configures stdout logging for an app hosted in Azure App Service. A local path or network share path is acceptable for local logging. Confirm that the AppPool user identity has permission to write to the path provided. +::: moniker range=">= aspnetcore-2.2" + +```xml + + +``` + +::: moniker-end + +::: moniker range="< aspnetcore-2.2" + ```xml ``` +::: moniker-end + See [Configuration with web.config](#configuration-with-webconfig) for an example of the `aspNetCore` element in the *web.config* file. ## Proxy configuration uses HTTP protocol and a pairing token +::: moniker range=">= aspnetcore-2.2" + +*Only applies to out-of-process hosting.* + +::: moniker-end + The proxy created between the ASP.NET Core Module and Kestrel uses the HTTP protocol. Using HTTP is a performance optimization, where the traffic between the module and Kestrel takes place on a loopback address off of the network interface. There's no risk of eavesdropping the traffic between the module and Kestrel from a location off of the server. A pairing token is used to guarantee that the requests received by Kestrel were proxied by IIS and didn't come from some other source. The pairing token is created and set into an environment variable (`ASPNETCORE_TOKEN`) by the module. The pairing token is also set into a header (`MSAspNetCoreToken`) on every proxied request. IIS Middleware checks each request it receives to confirm that the pairing token header value matches the environment variable value. If the token values are mismatched, the request is logged and rejected. The pairing token environment variable and the traffic between the module and Kestrel aren't accessible from a location off of the server. Without knowing the pairing token value, an attacker can't submit requests that bypass the check in the IIS Middleware. diff --git a/aspnetcore/host-and-deploy/iis/index.md b/aspnetcore/host-and-deploy/iis/index.md index 57ccfd63fbdc..788cb6ac5fca 100644 --- a/aspnetcore/host-and-deploy/iis/index.md +++ b/aspnetcore/host-and-deploy/iis/index.md @@ -4,7 +4,7 @@ author: guardrex description: Learn how to host ASP.NET Core apps on Windows Server Internet Information Services (IIS). ms.author: riande ms.custom: mvc -ms.date: 09/13/2018 +ms.date: 09/21/2018 uid: host-and-deploy/iis/index --- # Host ASP.NET Core on Windows with IIS @@ -40,6 +40,8 @@ For information on hosting in Azure, see For an in-process deployment when an HTTP/2 connection is established, [HttpRequest.Protocol](xref:Microsoft.AspNetCore.Http.HttpRequest.Protocol*) reports `HTTP/2`. For an out-of-process deployment when an HTTP/2 connection is established, [HttpRequest.Protocol](xref:Microsoft.AspNetCore.Http.HttpRequest.Protocol*) reports `HTTP/1.1`. +For more information on the in-process and out-of-process hosting models, see the topic and the . + ::: moniker-end ::: moniker range="< aspnetcore-2.2" @@ -61,9 +63,31 @@ HTTP/2 is enabled by default. Connections fall back to HTTP/1.1 if an HTTP/2 con ### Enable the IISIntegration components -::: moniker range=">= aspnetcore-2.0" +::: moniker range=">= aspnetcore-2.2" + +**In-process hosting model** + +A typical *Program.cs* calls to begin setting up a host. `CreateDefaultBuilder` calls the method to boot the [CoreCLR](/dotnet/standard/glossary#coreclr) and host the app inside of the IIS worker process (`w3wp.exe`). Performance tests indicate that hosting a .NET Core app in-process delivers higher request throughput compared to hosting the app out-of-process and proxying requests to [Kestrel](xref:fundamentals/servers/kestrel). + +**Out-of-process hosting model** + +A typical *Program.cs* calls to begin setting up a host. For out-of-process hosting with IIS, `CreateDefaultBuilder` configures [Kestrel](xref:fundamentals/servers/kestrel) as the web server and enables IIS integration by configuring the base path and port for the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module): + +```csharp +public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) + ... +``` + +The ASP.NET Core Module generates a dynamic port to assign to the back-end process. `CreateDefaultBuilder` calls the method, which picks up the dynamic port and configures Kestrel to listen on `http://localhost:{dynamicPort}/`. This overrides other URL configurations, such as calls to `UseUrls` or [Kestrel's Listen API](xref:fundamentals/servers/kestrel#endpoint-configuration). Therefore, calls to `UseUrls` or Kestrel's `Listen` API aren't required when using the module. If `UseUrls` or `Listen` is called, Kestrel listens on the port specified when running the app without IIS. + +For more information on the in-process and out-of-process hosting models, see the topic and the . + +::: moniker-end + +::: moniker range="= aspnetcore-2.0 || aspnetcore-2.1" -A typical *Program.cs* calls [CreateDefaultBuilder](/dotnet/api/microsoft.aspnetcore.webhost.createdefaultbuilder) to begin setting up a host. `CreateDefaultBuilder` configures [Kestrel](xref:fundamentals/servers/kestrel) as the web server and enables IIS integration by configuring the base path and port for the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module): +A typical *Program.cs* calls to begin setting up a host. `CreateDefaultBuilder` configures [Kestrel](xref:fundamentals/servers/kestrel) as the web server and enables IIS integration by configuring the base path and port for the [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module): ```csharp public static IWebHost BuildWebHost(string[] args) => From 3b1eaf0a20ae6fe37e42f8c3fc64b5e9a0774174 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 21 Sep 2018 16:06:42 -0500 Subject: [PATCH 2/5] React to feedback --- .../fundamentals/servers/aspnet-core-module.md | 12 ++++++------ aspnetcore/fundamentals/servers/index.md | 2 +- aspnetcore/host-and-deploy/aspnet-core-module.md | 2 +- aspnetcore/host-and-deploy/iis/index.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aspnetcore/fundamentals/servers/aspnet-core-module.md b/aspnetcore/fundamentals/servers/aspnet-core-module.md index 9292cb6bb49a..435169fb0948 100644 --- a/aspnetcore/fundamentals/servers/aspnet-core-module.md +++ b/aspnetcore/fundamentals/servers/aspnet-core-module.md @@ -48,7 +48,7 @@ The ASP.NET Core Module is a native IIS module that plugs into the IIS pipeline * Host an ASP.NET Core app inside of the IIS worker process (`w3wp.exe`), called the [in-process hosting model](#in-process-hosting-model). -* Redirect web requests to a backend ASP.NET Core app running the [Kestrel server](xref:fundamentals/servers/kestrel), called the [out-of-process hosting model](#out-of-process-hosting-model). +* Forward web requests to a backend ASP.NET Core app running the [Kestrel server](xref:fundamentals/servers/kestrel), called the [out-of-process hosting model](#out-of-process-hosting-model). ### In-process hosting model @@ -65,13 +65,13 @@ The following diagram illustrates the relationship between IIS, the ASP.NET Core ![ASP.NET Core Module](aspnet-core-module/_static/ancm-inprocess.png) -A request arrives from the web to the kernel-mode HTTP.sys driver. The driver routes the request to IIS on the website's configured port, usually 80 (HTTP) or 443 (HTTPS). The module manages the native request context and converts it into a managed request for a custom implementation, `IISHttpServer`. +A request arrives from the web to the kernel-mode HTTP.sys driver. The driver routes the native request to IIS on the website's configured port, usually 80 (HTTP) or 443 (HTTPS). The module receives the native request and passes control to `IISHttpServer`, which is what converts the request from native to managed. After `IISHttpServer` picks up the request, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. ### Out-of-process hosting model -Because ASP.NET Core apps run in a process separate from the IIS worker process, the module handles process management. The module starts the process for the ASP.NET Core app when the first request arrives and restarts the app if it crashes. This is essentially the same behavior as seen with apps that run in-process that are managed by the [Windows Process Activation Service (WAS)](/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was). +Because ASP.NET Core apps run in a process separate from the IIS worker process, the module handles process management. The module starts the process for the ASP.NET Core app when the first request arrives and restarts the app if it shuts down or crashes. This is essentially the same behavior as seen with apps that run in-process that are managed by the [Windows Process Activation Service (WAS)](/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was). The following diagram illustrates the relationship between IIS, the ASP.NET Core Module, and an app hosted out-of-process: @@ -81,13 +81,13 @@ Requests arrive from the web to the kernel-mode HTTP.sys driver. The driver rout The module specifies the port via an environment variable at startup, and the IIS Integration Middleware configures the server to listen on `http://localhost:{port}`. Additional checks are performed, and requests that don't originate from the module are rejected. The module doesn't support HTTPS forwarding, so requests are forwarded over HTTP even if received by IIS over HTTPS. -After Kestrel picks up the request from the module, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. +After Kestrel picks up the request from the module, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. Middleware added by IIS Integration updates the scheme, remote IP, and pathbase to account for forwarding the request to Kestrel. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. ::: moniker-end ::: moniker range="< aspnetcore-2.2" -The ASP.NET Core Module is a native IIS module that plugs into the IIS pipeline to redirect web requests to backend ASP.NET Core apps. +The ASP.NET Core Module is a native IIS module that plugs into the IIS pipeline to forward web requests to backend ASP.NET Core apps. Because ASP.NET Core apps run in a process separate from the IIS worker process, the module also handles process management. The module starts the process for the ASP.NET Core app when the first request arrives and restarts the app if it crashes. This is essentially the same behavior as seen with ASP.NET 4.x apps that run in-process in IIS that are managed by the [Windows Process Activation Service (WAS)](/iis/manage/provisioning-and-managing-iis/features-of-the-windows-process-activation-service-was). @@ -99,7 +99,7 @@ Requests arrive from the web to the kernel-mode HTTP.sys driver. The driver rout The module specifies the port via an environment variable at startup, and the IIS Integration Middleware configures the server to listen on `http://localhost:{port}`. Additional checks are performed, and requests that don't originate from the module are rejected. The module doesn't support HTTPS forwarding, so requests are forwarded over HTTP even if received by IIS over HTTPS. -After Kestrel picks up a request from the module, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. +After Kestrel picks up the request from the module, the request is pushed into the ASP.NET Core middleware pipeline. The middleware pipeline handles the request and passes it on as an `HttpContext` instance to the app's logic. Middleware added by IIS Integration updates the scheme, remote IP, and pathbase to account for forwarding the request to Kestrel. The app's response is passed back to IIS, which pushes it back out to the HTTP client that initiated the request. ::: moniker-end diff --git a/aspnetcore/fundamentals/servers/index.md b/aspnetcore/fundamentals/servers/index.md index 51b84a8b7819..15efda898bf2 100644 --- a/aspnetcore/fundamentals/servers/index.md +++ b/aspnetcore/fundamentals/servers/index.md @@ -68,7 +68,7 @@ IIS, Nginx, and Apache can't be used without Kestrel or a [custom server impleme ::: moniker range=">= aspnetcore-2.2" -When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture), the ASP.NET Core app either runs in the same process as the IIS worker process (the *in-process* hosting model) or in a process separate from the IIS worker process (the *out-of-process* hosting model). When using [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview), the app always runs with the in-process hosting model. +When using [IIS](/iis/get-started/introduction-to-iis/introduction-to-iis-architecture) or [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview), the ASP.NET Core app either runs in the same process as the IIS worker process (the *in-process* hosting model) or in a process separate from the IIS worker process (the *out-of-process* hosting model). The [ASP.NET Core Module](xref:fundamentals/servers/aspnet-core-module) is a native IIS module that handles native IIS requests between either the in-process IIS Http Server or the out-of-process Kestrel server. For more information, see . diff --git a/aspnetcore/host-and-deploy/aspnet-core-module.md b/aspnetcore/host-and-deploy/aspnet-core-module.md index 047117aa7426..ef6533cc9a3e 100644 --- a/aspnetcore/host-and-deploy/aspnet-core-module.md +++ b/aspnetcore/host-and-deploy/aspnet-core-module.md @@ -19,7 +19,7 @@ This document provides instructions on how to configure the ASP.NET Core Module For apps running on .NET Core 2.2 or later, the module supports an in-process hosting model for improved performance compared to reverse-proxy (out-of-process) hosting. For more information, see . -In-procsess hosting is opt-in, but [dotnet new](/dotnet/core/tools/dotnet-new) templates default to the in-process hosting model for all IIS Express scenarios. +In-procsess hosting is opt-in for existing apps, but [dotnet new](/dotnet/core/tools/dotnet-new) templates default to the in-process hosting model for all IIS and IIS Express scenarios. To configure an app for in-process hosting, add the `` property to the app's project file with a value of `inprocess` (out-of-process hosting is set with `outofprocess`): diff --git a/aspnetcore/host-and-deploy/iis/index.md b/aspnetcore/host-and-deploy/iis/index.md index 788cb6ac5fca..29d8a2252f2e 100644 --- a/aspnetcore/host-and-deploy/iis/index.md +++ b/aspnetcore/host-and-deploy/iis/index.md @@ -79,7 +79,7 @@ public static IWebHost BuildWebHost(string[] args) => ... ``` -The ASP.NET Core Module generates a dynamic port to assign to the back-end process. `CreateDefaultBuilder` calls the method, which picks up the dynamic port and configures Kestrel to listen on `http://localhost:{dynamicPort}/`. This overrides other URL configurations, such as calls to `UseUrls` or [Kestrel's Listen API](xref:fundamentals/servers/kestrel#endpoint-configuration). Therefore, calls to `UseUrls` or Kestrel's `Listen` API aren't required when using the module. If `UseUrls` or `Listen` is called, Kestrel listens on the port specified when running the app without IIS. +The ASP.NET Core Module generates a dynamic port to assign to the back-end process. `CreateDefaultBuilder` calls the method, which picks up the dynamic port and configures Kestrel to listen on `http://localhost:{dynamicPort}/`. This overrides other URL configurations, such as calls to `UseUrls` or [Kestrel's Listen API](xref:fundamentals/servers/kestrel#endpoint-configuration). Therefore, calls to `UseUrls` or Kestrel's `Listen` API aren't required when using the module. If `UseUrls` or `Listen` is called, Kestrel only listens on the ports specified when running the app without IIS. For more information on the in-process and out-of-process hosting models, see the topic and the . From bec666a9e406982b7920152cfb55b80057848281 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 21 Sep 2018 20:23:38 -0500 Subject: [PATCH 3/5] React to feedback --- .../servers/aspnet-core-module.md | 2 ++ .../host-and-deploy/aspnet-core-module.md | 21 ------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/aspnetcore/fundamentals/servers/aspnet-core-module.md b/aspnetcore/fundamentals/servers/aspnet-core-module.md index 435169fb0948..aada9fc91672 100644 --- a/aspnetcore/fundamentals/servers/aspnet-core-module.md +++ b/aspnetcore/fundamentals/servers/aspnet-core-module.md @@ -30,6 +30,8 @@ Supported Windows versions: ::: moniker range=">= aspnetcore-2.2" +When hosting in-process, the module has its own server implementation, `IISHttpServer`. + When hosting out-of-process, the module only works with Kestrel. The module is incompatible with [HTTP.sys](xref:fundamentals/servers/httpsys) (formerly called [WebListener](xref:fundamentals/servers/weblistener)). ::: moniker-end diff --git a/aspnetcore/host-and-deploy/aspnet-core-module.md b/aspnetcore/host-and-deploy/aspnet-core-module.md index ef6533cc9a3e..453ce4956ace 100644 --- a/aspnetcore/host-and-deploy/aspnet-core-module.md +++ b/aspnetcore/host-and-deploy/aspnet-core-module.md @@ -43,33 +43,12 @@ The following characteristics apply when hosting in-process: * If setting up the app's host manually with `WebHostBuilder` (not using [CreateDefaultBuilder](xref:fundamentals/host/web-host#set-up-a-host)) and the app is ever run directly on the Kestrel server (self-hosted), call `UseKestrel` before calling `UseIISIntegration`. If the order is reversed, the host fails to start. -* Don't use to set the content root with . See the [Content Root](#content-root) section for details. - ### Hosting model changes If the `hostingModel` setting is changed in the *web.config* file (explained in the [Configuration with web.config](#configuration-with-webconfig) section), the module recycles the worker process for IIS. For IIS Express, the module doesn't recycle the worker process but instead triggers a graceful shutdown of the current IIS Express process. The next request to the app spawns a new IIS Express process. -### Content root - -When running an app in-process, the current directory reported by is *C:\\Windows\\System32\\inetsrv\\*. To set the content root, use [AppDomain.CurrentDomain.BaseDirectory](xref:System.AppDomain.BaseDirectory*) with : - -```csharp -public class Program -{ - public static void Main(string[] args) - { - CreateWebHostBuilder(args).Build().Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseContentRoot(AppDomain.CurrentDomain.BaseDirectory) - .UseStartup(); -} -``` - ### Process name `Process.GetCurrentProcess().ProcessName` reports either `w3wp` (in-process) or `dotnet` (out-of-process). From 04d833e0b2e9c8f58252260688b447ea53a62b0b Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 24 Sep 2018 11:51:58 -0500 Subject: [PATCH 4/5] UseIIS for in-proc --- aspnetcore/host-and-deploy/iis/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/host-and-deploy/iis/index.md b/aspnetcore/host-and-deploy/iis/index.md index 29d8a2252f2e..4fd07875ba48 100644 --- a/aspnetcore/host-and-deploy/iis/index.md +++ b/aspnetcore/host-and-deploy/iis/index.md @@ -67,7 +67,7 @@ HTTP/2 is enabled by default. Connections fall back to HTTP/1.1 if an HTTP/2 con **In-process hosting model** -A typical *Program.cs* calls to begin setting up a host. `CreateDefaultBuilder` calls the method to boot the [CoreCLR](/dotnet/standard/glossary#coreclr) and host the app inside of the IIS worker process (`w3wp.exe`). Performance tests indicate that hosting a .NET Core app in-process delivers higher request throughput compared to hosting the app out-of-process and proxying requests to [Kestrel](xref:fundamentals/servers/kestrel). +A typical *Program.cs* calls to begin setting up a host. `CreateDefaultBuilder` calls the `UseIIS` method to boot the [CoreCLR](/dotnet/standard/glossary#coreclr) and host the app inside of the IIS worker process (`w3wp.exe`). Performance tests indicate that hosting a .NET Core app in-process delivers higher request throughput compared to hosting the app out-of-process and proxying requests to [Kestrel](xref:fundamentals/servers/kestrel). **Out-of-process hosting model** From 393ccd386671c4b4a73d7b64461b6f46e0b1e10f Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Mon, 8 Oct 2018 21:22:25 -0500 Subject: [PATCH 5/5] Add "V2" to module name --- aspnetcore/host-and-deploy/aspnet-core-module.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/host-and-deploy/aspnet-core-module.md b/aspnetcore/host-and-deploy/aspnet-core-module.md index 453ce4956ace..1c162d5b3520 100644 --- a/aspnetcore/host-and-deploy/aspnet-core-module.md +++ b/aspnetcore/host-and-deploy/aspnet-core-module.md @@ -68,7 +68,7 @@ The following *web.config* file is published for a [framework-dependent deployme - + - +