From 20a13dd61afd36b0d585407079f9670871747be3 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:48:48 -1000 Subject: [PATCH 1/5] refactor --- aspnetcore/test/troubleshoot-azure-iis.md | 92 +++++++++++------------ 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/aspnetcore/test/troubleshoot-azure-iis.md b/aspnetcore/test/troubleshoot-azure-iis.md index 638360649795..f3a8db27debd 100644 --- a/aspnetcore/test/troubleshoot-azure-iis.md +++ b/aspnetcore/test/troubleshoot-azure-iis.md @@ -629,11 +629,11 @@ Explains what to do when incoherent packages break an app when performing major [Additional resources](#additional-resources) Lists additional troubleshooting topics. -## App startup errors +## z App startup errors In Visual Studio, the ASP.NET Core project default server is Kestrel. Visual studio can be configured to use [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview). A *502.5 - Process Failure* or a *500.30 - Start Failure* that occurs when debugging locally with IIS Express can be diagnosed using the advice in this topic. -### 403.14 Forbidden +### z 403.14 Forbidden The app fails to start. The following error is logged: @@ -658,7 +658,7 @@ Perform the following steps: For more information on the layout of a published ASP.NET Core app, see . For more information on the *web.config* file, see . -### 500 Internal Server Error +### z 500 Internal Server Error The app starts, but an error prevents the server from fulfilling the request. @@ -666,7 +666,7 @@ This error occurs within the app's code during startup or while creating a respo This error also may occur when the .NET Core Hosting Bundle isn't installed or is corrupted. Installing or repairing the installation of the .NET Core Hosting Bundle (for IIS) or Visual Studio (for IIS Express) may fix the problem. -### 500.0 In-Process Handler Load Failure +### z 500.0 In-Process Handler Load Failure The worker process fails. The app doesn't start. @@ -676,7 +676,7 @@ An unknown error occurred loading [ASP.NET Core Module](xref:host-and-deploy/asp * Ask a question on Stack Overflow. * File an issue on our [GitHub repository](https://github.com/dotnet/AspNetCore). -### 500.30 In-Process Startup Failure +### z 500.30 In-Process Startup Failure The worker process fails. The app doesn't start. @@ -687,7 +687,7 @@ Common failure conditions: * The app is misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine. * Using Azure Key Vault, lack of permissions to the Key Vault. Check the access policies in the targeted Key Vault to ensure that the correct permissions are granted. -### 500.31 ANCM Failed to Find Native Dependencies +### z 500.31 ANCM Failed to Find Native Dependencies The worker process fails. The app doesn't start. @@ -711,7 +711,7 @@ The error message lists all the installed .NET Core versions and the version req When running in development (the `ASPNETCORE_ENVIRONMENT` environment variable is set to `Development`), the specific error is written to the HTTP response. The cause of a process startup failure is also found in the Application Event Log. -### 500.32 ANCM Failed to Load dll +### z 500.32 ANCM Failed to Load dll The worker process fails. The app doesn't start. @@ -722,7 +722,7 @@ To fix this error, either: * Republish the app for the same processor architecture as the worker process. * Publish the app as a [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-executables-fde). -### 500.33 ANCM Request Handler Load Failure +### z 500.33 ANCM Request Handler Load Failure The worker process fails. The app doesn't start. @@ -730,31 +730,31 @@ The app didn't reference the `Microsoft.AspNetCore.App` framework. Only apps tar To fix this error, confirm that the app is targeting the `Microsoft.AspNetCore.App` framework. Check the `.runtimeconfig.json` to verify the framework targeted by the app. -### 500.34 ANCM Mixed Hosting Models Not Supported +### z 500.34 ANCM Mixed Hosting Models Not Supported The worker process can't run both an in-process app and an out-of-process app in the same process. To fix this error, run apps in separate IIS application pools. -### 500.35 ANCM Multiple In-Process Applications in same Process +### z 500.35 ANCM Multiple In-Process Applications in same Process The worker process can't run multiple in-process apps in the same process. To fix this error, run apps in separate IIS application pools. -### 500.36 ANCM Out-Of-Process Handler Load Failure +### z 500.36 ANCM Out-Of-Process Handler Load Failure The out-of-process request handler, *aspnetcorev2_outofprocess.dll*, isn't next to the *aspnetcorev2.dll* file. This indicates a corrupted installation of the [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module). To fix this error, repair the installation of the [.NET Core Hosting Bundle](xref:host-and-deploy/iis/index#install-the-net-core-hosting-bundle) (for IIS) or Visual Studio (for IIS Express). -### 500.37 ANCM Failed to Start Within Startup Time Limit +### z 500.37 ANCM Failed to Start Within Startup Time Limit ANCM failed to start within the provided startup time limit. By default, the timeout is 120 seconds. This error can occur when starting a large number of apps on the same machine. Check for CPU/Memory usage spikes on the server during startup. You may need to stagger the startup process of multiple apps. -### 500.38 ANCM Application DLL Not Found +### z 500.38 ANCM Application DLL Not Found ANCM failed to locate the application DLL, which should be next to the executable. @@ -763,7 +763,7 @@ This error occurs when hosting an app packaged as a [single-file executable](/do 1. Disable single-file publishing by setting the `PublishSingleFile` MSBuild property to `false`. 1. Switch to the out-of-process hosting model by setting the `AspNetCoreHostingModel` MSBuild property to `OutOfProcess`. -### 502.5 Process Failure +### z 502.5 Process Failure The worker process fails. The app doesn't start. @@ -773,7 +773,7 @@ A common failure condition is the app is misconfigured due to targeting a versio The *502.5 Process Failure* error page is returned when a hosting or app misconfiguration causes the worker process to fail: -### Failed to start application (ErrorCode '0x800700c1') +### z Failed to start application (ErrorCode '0x800700c1') ``` EventID: 1010 @@ -795,7 +795,7 @@ Confirm that the app pool's 32-bit setting is correct: Confirm that there isn't a conflict between a `` MSBuild property in the project file and the published bitness of the app. -### Failed to start application (ErrorCode '0x800701b1') +### z Failed to start application (ErrorCode '0x800701b1') ``` EventID: 1010 @@ -812,19 +812,19 @@ The following command enables the `null` Windows Service: sc.exe start null ``` -### Connection reset +### z Connection reset If an error occurs after the headers are sent, it's too late for the server to send a **500 Internal Server Error** when an error occurs. This often happens when an error occurs during the serialization of complex objects for a response. This type of error appears as a *connection reset* error on the client. [Application logging](xref:fundamentals/logging/index) can help troubleshoot these types of errors. -### Default startup limits +### z Default startup limits The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) is configured with a default *startupTimeLimit* of 120 seconds. When left at the default value, an app may take up to two minutes to start before the module logs a process failure. For information on configuring the module, see [Attributes of the aspNetCore element](xref:host-and-deploy/aspnet-core-module#attributes-of-the-aspnetcore-element). -## Troubleshoot on Azure App Service +## z Troubleshoot on Azure App Service [!INCLUDE [Azure App Service Preview Notice](~/includes/azure-apps-preview-notice.md)] -### Azure App Services Log stream +### z Azure App Services Log stream The Azure App Services Log streams logging information as it occurs. To view streaming logs: @@ -843,7 +843,7 @@ The Azure App Services Log streams logging information as it occurs. To view str Streaming logs have some latency and might not display immediately. -### Application Event Log (Azure App Service) +### z Application Event Log (Azure App Service) To access the Application Event Log, use the **Diagnose and solve problems** blade in the Azure portal: @@ -861,14 +861,14 @@ An alternative to using the **Diagnose and solve problems** blade is to examine 1. Select the pencil icon next to the `eventlog.xml` file. 1. Examine the log. Scroll to the bottom of the log to see the most recent events. -### Run the app in the Kudu console +### z Run the app in the Kudu console Many startup errors don't produce useful information in the Application Event Log. You can run the app in the [Kudu](https://github.com/projectkudu/kudu/wiki) Remote Execution Console to discover the error: 1. Open **Advanced Tools** in the **Development Tools** area. Select the **Go→** button. The Kudu console opens in a new browser tab or window. 1. Using the navigation bar at the top of the page, open **Debug console** and select **CMD**. -#### Test a 32-bit (x86) app +#### z Test a 32-bit (x86) app **Current release** @@ -897,7 +897,7 @@ The console output from the app, showing any errors, is piped to the Kudu consol The console output from the app, showing any errors, is piped to the Kudu console. -#### Test a 64-bit (x64) app +#### z Test a 64-bit (x64) app **Current release** @@ -919,7 +919,7 @@ The console output from the app, showing any errors, is piped to the Kudu consol The console output from the app, showing any errors, is piped to the Kudu console. -### ASP.NET Core Module stdout log (Azure App Service) +### z ASP.NET Core Module stdout log (Azure App Service) > [!WARNING] > Failure to disable the stdout log can lead to app or server failure. There's no limit on log file size or the number of log files created. Only use stdout logging to troubleshoot app startup problems. @@ -942,7 +942,7 @@ For more information, see -### ASP.NET Core Module debug log (Azure App Service) +### z ASP.NET Core Module debug log (Azure App Service) The ASP.NET Core Module debug log provides additional, deeper logging from the ASP.NET Core Module. To enable and view stdout logs: @@ -971,11 +971,11 @@ For more information, see > For general logging in an ASP.NET Core app after startup, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). -### Slow or hanging app (Azure App Service) +### z Slow or hanging app (Azure App Service) When an app responds slowly or hangs on a request, see [Troubleshoot slow web app performance issues in Azure App Service](/azure/app-service/app-service-web-troubleshoot-performance-degradation). -### Monitoring blades +### z Monitoring blades Monitoring blades provide an alternative troubleshooting experience to the methods described earlier in the topic. These blades can be used to diagnose 500-series errors. @@ -1023,9 +1023,9 @@ For more information, see [Enable diagnostics logging for web apps in Azure App > > For routine logging in an ASP.NET Core app, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). -## Troubleshoot on IIS +## z Troubleshoot on IIS -### Application Event Log (IIS) +### z Application Event Log (IIS) Access the Application Event Log: @@ -1034,11 +1034,11 @@ Access the Application Event Log: 1. Select **Application** to open the Application Event Log. 1. Search for errors associated with the failing app. Errors have a value of *IIS AspNetCore Module* or *IIS Express AspNetCore Module* in the *Source* column. -### Run the app at a command prompt +### z Run the app at a command prompt Many startup errors don't produce useful information in the Application Event Log. You can find the cause of some errors by running the app at a command prompt on the hosting system. -#### Framework-dependent deployment +#### z Framework-dependent deployment If the app is a [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-deployments-fdd): @@ -1046,7 +1046,7 @@ If the app is a [framework-dependent deployment](/dotnet/core/deploying/#framewo 1. The console output from the app, showing any errors, is written to the console window. 1. If the errors occur when making a request to the app, make a request to the host and port where Kestrel listens. Using the default host and post, make a request to `http://localhost:5000/`. If the app responds normally at the Kestrel endpoint address, the problem is more likely related to the hosting configuration and less likely within the app. -#### Self-contained deployment +#### z Self-contained deployment If the app is a [self-contained deployment](/dotnet/core/deploying/#self-contained-deployments-scd): @@ -1054,7 +1054,7 @@ If the app is a [self-contained deployment](/dotnet/core/deploying/#self-contain 1. The console output from the app, showing any errors, is written to the console window. 1. If the errors occur when making a request to the app, make a request to the host and port where Kestrel listens. Using the default host and post, make a request to `http://localhost:5000/`. If the app responds normally at the Kestrel endpoint address, the problem is more likely related to the hosting configuration and less likely within the app. -### ASP.NET Core Module stdout log (IIS) +### z ASP.NET Core Module stdout log (IIS) To enable and view stdout logs: @@ -1080,7 +1080,7 @@ For more information, see > For routine logging in an ASP.NET Core app, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). -### ASP.NET Core Module debug log (IIS) +### z ASP.NET Core Module debug log (IIS) Add the following handler settings to the app's *web.config* file to enable ASP.NET Core Module debug log: @@ -1097,7 +1097,7 @@ Confirm that the path specified for the log exists and that the app pool's ident For more information, see . -### Enable the Developer Exception Page +### z Enable the Developer Exception Page The `ASPNETCORE_ENVIRONMENT` [environment variable can be added to web.config](xref:host-and-deploy/aspnet-core-module#setting-environment-variables) to run the app in the Development environment. As long as the environment isn't overridden in app startup by `UseEnvironment` on the host builder, setting the environment variable allows the [Developer Exception Page](xref:fundamentals/error-handling) to appear when the app is run. @@ -1115,15 +1115,15 @@ The `ASPNETCORE_ENVIRONMENT` [environment variable can be added to web.config](x Setting the environment variable for `ASPNETCORE_ENVIRONMENT` is only recommended for use on staging and testing servers that aren't exposed to the Internet. Remove the environment variable from the *web.config* file after troubleshooting. For information on setting environment variables in *web.config*, see [environmentVariables child element of aspNetCore](xref:host-and-deploy/aspnet-core-module#setting-environment-variables). -### Obtain data from an app +### z Obtain data from an app If an app is capable of responding to requests, obtain request, connection, and additional data from the app using terminal inline middleware. For more information and sample code, see . -### Slow or hanging app (IIS) +### z Slow or hanging app (IIS) A *crash dump* is a snapshot of the system's memory and can help determine the cause of an app crash, startup failure, or slow app. -#### App crashes or encounters an exception +#### z App crashes or encounters an exception Obtain and analyze a dump from [Windows Error Reporting (WER)](/windows/desktop/wer/windows-error-reporting): @@ -1160,15 +1160,15 @@ After an app crashes and dump collection is complete, the app is allowed to term > [!WARNING] > Crash dumps might take up a large amount of disk space (up to several gigabytes each). -#### App hangs, fails during startup, or runs normally +#### z App hangs, fails during startup, or runs normally When an app *hangs* (stops responding but doesn't crash), fails during startup, or runs normally, see [User-Mode Dump Files: Choosing the Best Tool](/windows-hardware/drivers/debugger/user-mode-dump-files#choosing-the-best-tool) to select an appropriate tool to produce the dump. -#### Analyze the dump +#### z Analyze the dump A dump can be analyzed using several approaches. For more information, see [Analyzing a User-Mode Dump File](/windows-hardware/drivers/debugger/analyzing-a-user-mode-dump-file). -## Clear package caches +## z Clear package caches A functioning app may fail immediately after upgrading either the .NET Core SDK on the development machine or changing package versions within the app. In some cases, incoherent packages may break an app when performing major upgrades. Most of these issues can be fixed by following these instructions: @@ -1180,7 +1180,7 @@ A functioning app may fail immediately after upgrading either the .NET Core SDK 1. Restore and rebuild the project. 1. Delete all of the files in the deployment folder on the server prior to redeploying the app. -## Additional resources +## z Additional resources * * @@ -1188,7 +1188,7 @@ A functioning app may fail immediately after upgrading either the .NET Core SDK * * -### Azure documentation +### z Azure documentation * [Application Insights for ASP.NET Core](/azure/application-insights/app-insights-asp-net-core) * [Remote debugging web apps section of Troubleshoot a web app in Azure App Service using Visual Studio](/azure/app-service/web-sites-dotnet-troubleshoot-visual-studio#remotedebug) @@ -1200,7 +1200,7 @@ A functioning app may fail immediately after upgrading either the .NET Core SDK * [Application performance FAQs for Web Apps in Azure](/azure/app-service/app-service-web-availability-performance-application-issues-faq) * [Azure Web App sandbox (App Service runtime execution limitations)](https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox) -### Visual Studio documentation +### z Visual Studio documentation * [Remote Debug ASP.NET Core on IIS in Azure in Visual Studio 2017](/visualstudio/debugger/remote-debugging-azure) * [Remote Debug ASP.NET Core on a Remote IIS Computer in Visual Studio 2017](/visualstudio/debugger/remote-debugging-aspnet-on-a-remote-iis-computer) @@ -1212,8 +1212,6 @@ A functioning app may fail immediately after upgrading either the .NET Core SDK :::moniker-end -[!INCLUDE[](~/test/troubleshoot-azure-iis/includes/troubleshoot-azure-iis2.md)] -[!INCLUDE[](~/test/troubleshoot-azure-iis/includes/troubleshoot-azure-iis7.md)] [!INCLUDE[](~/test/troubleshoot-azure-iis/includes/troubleshoot-azure-iis2.md)] From 0ca443d47568d8c3fcdfea200752c8e22d54a657 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:52:45 -1000 Subject: [PATCH 2/5] refactor --- aspnetcore/test/troubleshoot-azure-iis.md | 120 ++-------------------- 1 file changed, 8 insertions(+), 112 deletions(-) diff --git a/aspnetcore/test/troubleshoot-azure-iis.md b/aspnetcore/test/troubleshoot-azure-iis.md index f3a8db27debd..5542da762e96 100644 --- a/aspnetcore/test/troubleshoot-azure-iis.md +++ b/aspnetcore/test/troubleshoot-azure-iis.md @@ -12,7 +12,7 @@ uid: test/troubleshoot-azure-iis :::moniker range=">= aspnetcore-8.0" -This article provides information on common app startup errors and instructions on how to diagnose errors when an app is deployed to Azure App Service or IIS: +This article provides information on common app startup errors and instructions on how to diagnose errors when an app is deployed to IIS: [App startup errors](#app-startup-errors) Explains common startup HTTP status code scenarios. @@ -50,13 +50,12 @@ The error is usually caused by a broken deployment on the hosting system, which Perform the following steps: 1. Delete all of the files and folders from the deployment folder on the hosting system. -1. Redeploy the contents of the app's *publish* folder to the hosting system using your normal method of deployment, such as Visual Studio, PowerShell, or manual deployment: - * Confirm that the *web.config* file is present in the deployment and that its contents are correct. - * When hosting on Azure App Service, confirm that the app is deployed to the `D:\home\site\wwwroot` folder. - * When the app is hosted by IIS, confirm that the app is deployed to the IIS **Physical path** shown in **IIS Manager**'s **Basic Settings**. +1. Redeploy the contents of the app's *publish* folder to the hosting system using your normal method of deployment, such as Visual Studio, PowerShell, or manual deployment. * Confirm that the: + *web.config* file is present in the deployment and that its contents are correct. + * App is deployed to the IIS **Physical path** shown in **IIS Manager**'s **Basic Settings**. 1. Confirm that all of the app's files and folders are deployed by comparing the deployment on the hosting system to the contents of the project's *publish* folder. -For more information on the layout of a published ASP.NET Core app, see . For more information on the *web.config* file, see . +For more information on the *web.config* file, see . ### 500 Internal Server Error @@ -82,10 +81,7 @@ The worker process fails. The app doesn't start. The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) attempts to start the .NET Core CLR in-process, but it fails to start. The cause of a process startup failure can usually be determined from entries in the Application Event Log and the ASP.NET Core Module stdout log. -Common failure conditions: - -* The app is misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine. -* Using Azure Key Vault, lack of permissions to the Key Vault. Check the access policies in the targeted Key Vault to ensure that the correct permissions are granted. +The app my be misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine. ### 500.31 ANCM Failed to Find Native Dependencies @@ -115,7 +111,7 @@ When running in development (the `ASPNETCORE_ENVIRONMENT` environment variable i The worker process fails. The app doesn't start. -The most common cause for this error is that the app is published for an incompatible processor architecture. If the worker process is running as a 32-bit app and the app was published to target 64-bit, this error occurs. +Typically, the app is published for an incompatible processor architecture. If the worker process is running as a 32-bit app and the app was published to target 64-bit, this error occurs. To fix this error, either: @@ -220,105 +216,6 @@ If an error occurs after the headers are sent, it's too late for the server to s The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) is configured with a default *startupTimeLimit* of 120 seconds. When left at the default value, an app may take up to two minutes to start before the module logs a process failure. For information on configuring the module, see [Attributes of the aspNetCore element](xref:host-and-deploy/aspnet-core-module#attributes-of-the-aspnetcore-element). -## Troubleshoot on Azure App Service - -[!INCLUDE [Azure App Service Preview Notice](~/includes/azure-apps-preview-notice.md)] - -### Azure App Services Log stream - -The Azure App Services Log streams logging information as it occurs. To view streaming logs: - -1. In the Azure portal, open the app in **App Services**. -1. In the left pane, navigate to **Monitoring** > **App Service Logs**. - ![App Service Logs](https://user-images.githubusercontent.com/3605364/183573538-80645002-d1c3-4451-9a2f-91ef4de4e248.png) -1. Select **File System** for **Web Server Logging**. Optionally enable **Application logging**. - ![enable logging](https://user-images.githubusercontent.com/3605364/183529287-f63d3e1c-ee5b-4ca1-bcb6-a8c29d8b26f5.png) -1. In the left pane, navigate to **Monitoring** > **Log stream**, and then select **Application logs** or **Web Server Logs**. - - ![Monitoring Log stream](https://user-images.githubusercontent.com/3605364/183561255-91f3d5e1-141b-413b-a403-91e74a770545.png) - - The following images shows the application logs output: - - ![app logs](https://user-images.githubusercontent.com/3605364/183528795-532665c0-ce87-4ed3-8e4d-4b374d469c2a.png) - -Streaming logs have some latency and might not display immediately. - -### Application Event Log (Azure App Service) - -To access the Application Event Log, use the **Diagnose and solve problems** blade in the Azure portal: - -1. In the Azure portal, open the app in **App Services**. -1. Select **Diagnose and solve problems**. -1. Select the **Diagnostic Tools** heading. -1. Under **Support Tools**, select the **Application Events** button. -1. Examine the latest error provided by the *IIS AspNetCoreModule* or *IIS AspNetCoreModule V2* entry in the **Source** column. - -An alternative to using the **Diagnose and solve problems** blade is to examine the Application Event Log file directly using [Kudu](https://github.com/projectkudu/kudu/wiki): - -1. Open **Advanced Tools** in the **Development Tools** area. Select the **Go→** button. The Kudu console opens in a new browser tab or window. -1. Using the navigation bar at the top of the page, open **Debug console** and select **CMD**. -1. Open the **LogFiles** folder. -1. Select the pencil icon next to the `eventlog.xml` file. -1. Examine the log. Scroll to the bottom of the log to see the most recent events. - -### Run the app in the Kudu console - -Many startup errors don't produce useful information in the Application Event Log. You can run the app in the [Kudu](https://github.com/projectkudu/kudu/wiki) Remote Execution Console to discover the error: - -1. Open **Advanced Tools** in the **Development Tools** area. Select the **Go→** button. The Kudu console opens in a new browser tab or window. -1. Using the navigation bar at the top of the page, open **Debug console** and select **CMD**. - -#### Test a 32-bit (x86) app - -**Current release** - -1. `cd d:\home\site\wwwroot` -1. Run the app: - * If the app is a [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-deployments-fdd): - - ```dotnetcli - dotnet .\{ASSEMBLY NAME}.dll - ``` - - * If the app is a [self-contained deployment](/dotnet/core/deploying/#self-contained-deployments-scd): - - ```console - {ASSEMBLY NAME}.exe - ``` - -The console output from the app, showing any errors, is piped to the Kudu console. - -**Framework-dependent deployment running on a preview release** - -*Requires installing the ASP.NET Core {VERSION} (x86) Runtime site extension.* - -1. `cd D:\home\SiteExtensions\AspNetCoreRuntime.{X.Y}.x32` (`{X.Y}` is the runtime version) -1. Run the app: `dotnet \home\site\wwwroot\{ASSEMBLY NAME}.dll` - -The console output from the app, showing any errors, is piped to the Kudu console. - -#### Test a 64-bit (x64) app - -**Current release** - -* If the app is a 64-bit (x64) [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-deployments-fdd): - 1. `cd D:\Program Files\dotnet` - 1. Run the app: `dotnet \home\site\wwwroot\{ASSEMBLY NAME}.dll` -* If the app is a [self-contained deployment](/dotnet/core/deploying/#self-contained-deployments-scd): - 1. `cd D:\home\site\wwwroot` - 1. Run the app: `{ASSEMBLY NAME}.exe` - -The console output from the app, showing any errors, is piped to the Kudu console. - -**Framework-dependent deployment running on a preview release** - -*Requires installing the ASP.NET Core {VERSION} (x64) Runtime site extension.* - -1. `cd D:\home\SiteExtensions\AspNetCoreRuntime.{X.Y}.x64` (`{X.Y}` is the runtime version) -1. Run the app: `dotnet \home\site\wwwroot\{ASSEMBLY NAME}.dll` - -The console output from the app, showing any errors, is piped to the Kudu console. - ### ASP.NET Core Module stdout log (Azure App Service) > [!WARNING] @@ -327,8 +224,7 @@ The console output from the app, showing any errors, is piped to the Kudu consol > For general logging in an ASP.NET Core app after startup, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). The ASP.NET Core Module stdout log often records useful error messages not found in the Application Event Log. To enable and view stdout logs: - -1. In the Azure Portal, navigate to the web app. +zzz 1. In the **App Service** blade, enter **kudu** in the search box. 1. Select **Advanced Tools** > **Go**. 1. Select **Debug console > CMD**. From f9ca062dd08262b6e2221f28bde4328d8ed527ed Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:17:03 -1000 Subject: [PATCH 3/5] refactor --- aspnetcore/test/troubleshoot-azure-iis.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aspnetcore/test/troubleshoot-azure-iis.md b/aspnetcore/test/troubleshoot-azure-iis.md index 5542da762e96..9ada14591802 100644 --- a/aspnetcore/test/troubleshoot-azure-iis.md +++ b/aspnetcore/test/troubleshoot-azure-iis.md @@ -223,8 +223,10 @@ The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) is configured > > For general logging in an ASP.NET Core app after startup, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). -The ASP.NET Core Module stdout log often records useful error messages not found in the Application Event Log. To enable and view stdout logs: -zzz +#### Kudu console + +Navigate to the Kudu console to enable stdout logging: +1. In the Azure Portal, navigate to the web app. 1. In the **App Service** blade, enter **kudu** in the search box. 1. Select **Advanced Tools** > **Go**. 1. Select **Debug console > CMD**. @@ -506,6 +508,7 @@ A functioning app may fail immediately after upgrading either the .NET Core SDK * [Debugging with Visual Studio Code](https://code.visualstudio.com/docs/editor/debugging) + This article provides information on common app startup errors and instructions on how to diagnose errors when an app is deployed to Azure App Service or IIS: From 25e38df251911d2a2785c6b383c58148ad07cb21 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:06:54 -1000 Subject: [PATCH 4/5] refactor --- aspnetcore/test/troubleshoot-azure-iis.md | 271 ++-------------------- 1 file changed, 24 insertions(+), 247 deletions(-) diff --git a/aspnetcore/test/troubleshoot-azure-iis.md b/aspnetcore/test/troubleshoot-azure-iis.md index 9ada14591802..2f5add79bcad 100644 --- a/aspnetcore/test/troubleshoot-azure-iis.md +++ b/aspnetcore/test/troubleshoot-azure-iis.md @@ -208,7 +208,7 @@ The following command enables the `null` Windows Service: sc.exe start null ``` -### Connection reset +### IIS Connection reset If an error occurs after the headers are sent, it's too late for the server to send a **500 Internal Server Error** when an error occurs. This often happens when an error occurs during the serialization of complex objects for a response. This type of error appears as a *connection reset* error on the client. [Application logging](xref:fundamentals/logging/index) can help troubleshoot these types of errors. @@ -508,264 +508,41 @@ A functioning app may fail immediately after upgrading either the .NET Core SDK * [Debugging with Visual Studio Code](https://code.visualstudio.com/docs/editor/debugging) +## Troubleshoot ASP.NET Core on Azure App Service - - -This article provides information on common app startup errors and instructions on how to diagnose errors when an app is deployed to Azure App Service or IIS: - -[App startup errors](#app-startup-errors) -Explains common startup HTTP status code scenarios. - -[Troubleshoot on Azure App Service](#troubleshoot-on-azure-app-service) -Provides troubleshooting advice for apps deployed to Azure App Service. - -[Troubleshoot on IIS](#troubleshoot-on-iis) -Provides troubleshooting advice for apps deployed to IIS or running on IIS Express locally. The guidance applies to both Windows Server and Windows desktop deployments. - -[Clear package caches](#clear-package-caches) -Explains what to do when incoherent packages break an app when performing major upgrades or changing package versions. - -[Additional resources](#additional-resources) -Lists additional troubleshooting topics. - -## z App startup errors - -In Visual Studio, the ASP.NET Core project default server is Kestrel. Visual studio can be configured to use [IIS Express](/iis/extensions/introduction-to-iis-express/iis-express-overview). A *502.5 - Process Failure* or a *500.30 - Start Failure* that occurs when debugging locally with IIS Express can be diagnosed using the advice in this topic. - -### z 403.14 Forbidden - -The app fails to start. The following error is logged: - -``` -The Web server is configured to not list the contents of this directory. -``` - -The error is usually caused by a broken deployment on the hosting system, which includes any of the following scenarios: - -* The app is deployed to the wrong folder on the hosting system. -* The deployment process failed to move all of the app's files and folders to the deployment folder on the hosting system. -* The *web.config* file is missing from the deployment, or the *web.config* file contents are malformed. - -Perform the following steps: - -1. Delete all of the files and folders from the deployment folder on the hosting system. -1. Redeploy the contents of the app's *publish* folder to the hosting system using your normal method of deployment, such as Visual Studio, PowerShell, or manual deployment: - * Confirm that the *web.config* file is present in the deployment and that its contents are correct. - * When hosting on Azure App Service, confirm that the app is deployed to the `D:\home\site\wwwroot` folder. - * When the app is hosted by IIS, confirm that the app is deployed to the IIS **Physical path** shown in **IIS Manager**'s **Basic Settings**. -1. Confirm that all of the app's files and folders are deployed by comparing the deployment on the hosting system to the contents of the project's *publish* folder. - -For more information on the layout of a published ASP.NET Core app, see . For more information on the *web.config* file, see . - -### z 500 Internal Server Error - -The app starts, but an error prevents the server from fulfilling the request. - -This error occurs within the app's code during startup or while creating a response. The response may contain no content, or the response may appear as a *500 Internal Server Error* in the browser. The Application Event Log usually states that the app started normally. From the server's perspective, that's correct. The app did start, but it can't generate a valid response. Run the app at a command prompt on the server or enable the ASP.NET Core Module stdout log to troubleshoot the problem. - -This error also may occur when the .NET Core Hosting Bundle isn't installed or is corrupted. Installing or repairing the installation of the .NET Core Hosting Bundle (for IIS) or Visual Studio (for IIS Express) may fix the problem. - -### z 500.0 In-Process Handler Load Failure - -The worker process fails. The app doesn't start. - -An unknown error occurred loading [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) components. Take one of the following actions: - -* Contact [Microsoft Support](https://support.microsoft.com/oas/default.aspx?prid=15832) (select **Developer Tools** then **ASP.NET Core**). -* Ask a question on Stack Overflow. -* File an issue on our [GitHub repository](https://github.com/dotnet/AspNetCore). - -### z 500.30 In-Process Startup Failure - -The worker process fails. The app doesn't start. - -The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) attempts to start the .NET Core CLR in-process, but it fails to start. The cause of a process startup failure can usually be determined from entries in the Application Event Log and the ASP.NET Core Module stdout log. - -Common failure conditions: - -* The app is misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine. -* Using Azure Key Vault, lack of permissions to the Key Vault. Check the access policies in the targeted Key Vault to ensure that the correct permissions are granted. - -### z 500.31 ANCM Failed to Find Native Dependencies - -The worker process fails. The app doesn't start. - -The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) attempts to start the .NET Core runtime in-process, but it fails to start. The most common cause of this startup failure is when the `Microsoft.NETCore.App` or `Microsoft.AspNetCore.App` runtime isn't installed. If the app is deployed to target ASP.NET Core 3.0 and that version doesn't exist on the machine, this error occurs. An example error message follows: - -``` -The specified framework 'Microsoft.NETCore.App', version '3.0.0' was not found. - - The following frameworks were found: - 2.2.1 at [C:\Program Files\dotnet\x64\shared\Microsoft.NETCore.App] - 3.0.0-preview5-27626-15 at [C:\Program Files\dotnet\x64\shared\Microsoft.NETCore.App] - 3.0.0-preview6-27713-13 at [C:\Program Files\dotnet\x64\shared\Microsoft.NETCore.App] - 3.0.0-preview6-27714-15 at [C:\Program Files\dotnet\x64\shared\Microsoft.NETCore.App] - 3.0.0-preview6-27723-08 at [C:\Program Files\dotnet\x64\shared\Microsoft.NETCore.App] -``` - -The error message lists all the installed .NET Core versions and the version requested by the app. To fix this error, either: - -* Install the appropriate version of .NET Core on the machine. -* Change the app to target a version of .NET Core that's present on the machine. -* Publish the app as a [self-contained deployment](/dotnet/core/deploying/#self-contained-deployments-scd). - -When running in development (the `ASPNETCORE_ENVIRONMENT` environment variable is set to `Development`), the specific error is written to the HTTP response. The cause of a process startup failure is also found in the Application Event Log. - -### z 500.32 ANCM Failed to Load dll - -The worker process fails. The app doesn't start. - -The most common cause for this error is that the app is published for an incompatible processor architecture. If the worker process is running as a 32-bit app and the app was published to target 64-bit, this error occurs. - -To fix this error, either: - -* Republish the app for the same processor architecture as the worker process. -* Publish the app as a [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-executables-fde). - -### z 500.33 ANCM Request Handler Load Failure - -The worker process fails. The app doesn't start. - -The app didn't reference the `Microsoft.AspNetCore.App` framework. Only apps targeting the `Microsoft.AspNetCore.App` framework can be hosted by the [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module). - -To fix this error, confirm that the app is targeting the `Microsoft.AspNetCore.App` framework. Check the `.runtimeconfig.json` to verify the framework targeted by the app. - -### z 500.34 ANCM Mixed Hosting Models Not Supported - -The worker process can't run both an in-process app and an out-of-process app in the same process. - -To fix this error, run apps in separate IIS application pools. - -### z 500.35 ANCM Multiple In-Process Applications in same Process - -The worker process can't run multiple in-process apps in the same process. - -To fix this error, run apps in separate IIS application pools. - -### z 500.36 ANCM Out-Of-Process Handler Load Failure - -The out-of-process request handler, *aspnetcorev2_outofprocess.dll*, isn't next to the *aspnetcorev2.dll* file. This indicates a corrupted installation of the [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module). - -To fix this error, repair the installation of the [.NET Core Hosting Bundle](xref:host-and-deploy/iis/index#install-the-net-core-hosting-bundle) (for IIS) or Visual Studio (for IIS Express). - -### z 500.37 ANCM Failed to Start Within Startup Time Limit - -ANCM failed to start within the provided startup time limit. By default, the timeout is 120 seconds. - -This error can occur when starting a large number of apps on the same machine. Check for CPU/Memory usage spikes on the server during startup. You may need to stagger the startup process of multiple apps. - -### z 500.38 ANCM Application DLL Not Found - -ANCM failed to locate the application DLL, which should be next to the executable. - -This error occurs when hosting an app packaged as a [single-file executable](/dotnet/core/whats-new/dotnet-core-3-0#single-file-executables) using the in-process hosting model. The in-process model requires that the ANCM load the .NET Core app into the existing IIS process. This scenario isn't supported by the single-file deployment model. Use **one** of the following approaches in the app's project file to fix this error: - -1. Disable single-file publishing by setting the `PublishSingleFile` MSBuild property to `false`. -1. Switch to the out-of-process hosting model by setting the `AspNetCoreHostingModel` MSBuild property to `OutOfProcess`. - -### z 502.5 Process Failure - -The worker process fails. The app doesn't start. - -The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) attempts to start the worker process but it fails to start. The cause of a process startup failure can usually be determined from entries in the Application Event Log and the ASP.NET Core Module stdout log. - -A common failure condition is the app is misconfigured due to targeting a version of the ASP.NET Core shared framework that isn't present. Check which versions of the ASP.NET Core shared framework are installed on the target machine. The *shared framework* is the set of assemblies (*.dll* files) that are installed on the machine and referenced by a metapackage such as `Microsoft.AspNetCore.App`. The metapackage reference can specify a minimum required version. For more information, see [The shared framework](https://natemcmaster.com/blog/2018/08/29/netcore-primitives-2/). - -The *502.5 Process Failure* error page is returned when a hosting or app misconfiguration causes the worker process to fail: - -### z Failed to start application (ErrorCode '0x800700c1') - -``` -EventID: 1010 -Source: IIS AspNetCore Module V2 -Failed to start application '/LM/W3SVC/6/ROOT/', ErrorCode '0x800700c1'. -``` - -The app failed to start because the app's assembly (*.dll*) couldn't be loaded. - -This error occurs when there's a bitness mismatch between the published app and the w3wp/iisexpress process. - -Confirm that the app pool's 32-bit setting is correct: - -1. Select the app pool in IIS Manager's **Application Pools**. -1. Select **Advanced Settings** under **Edit Application Pool** in the **Actions** panel. -1. Set **Enable 32-Bit Applications**: - * If deploying a 32-bit (x86) app, set the value to `True`. - * If deploying a 64-bit (x64) app, set the value to `False`. - -Confirm that there isn't a conflict between a `` MSBuild property in the project file and the published bitness of the app. - -### z Failed to start application (ErrorCode '0x800701b1') - -``` -EventID: 1010 -Source: IIS AspNetCore Module V2 -Failed to start application '/LM/W3SVC/3/ROOT', ErrorCode '0x800701b1'. -``` - -The app failed to start because a Windows Service failed to load. - -One common service that needs to be enabled is the "null" service. -The following command enables the `null` Windows Service: - -```cmd -sc.exe start null -``` - -### z Connection reset - -If an error occurs after the headers are sent, it's too late for the server to send a **500 Internal Server Error** when an error occurs. This often happens when an error occurs during the serialization of complex objects for a response. This type of error appears as a *connection reset* error on the client. [Application logging](xref:fundamentals/logging/index) can help troubleshoot these types of errors. - -### z Default startup limits - -The [ASP.NET Core Module](xref:host-and-deploy/aspnet-core-module) is configured with a default *startupTimeLimit* of 120 seconds. When left at the default value, an app may take up to two minutes to start before the module logs a process failure. For information on configuring the module, see [Attributes of the aspNetCore element](xref:host-and-deploy/aspnet-core-module#attributes-of-the-aspnetcore-element). - -## z Troubleshoot on Azure App Service +This article provides information on how to diagnose problems and errors when an app is deployed to [Azure App Service](/azure/app-service/). [!INCLUDE [Azure App Service Preview Notice](~/includes/azure-apps-preview-notice.md)] -### z Azure App Services Log stream - -The Azure App Services Log streams logging information as it occurs. To view streaming logs: - -1. In the Azure portal, open the app in **App Services**. -1. In the left pane, navigate to **Monitoring** > **App Service Logs**. - ![App Service Logs](https://user-images.githubusercontent.com/3605364/183573538-80645002-d1c3-4451-9a2f-91ef4de4e248.png) -1. Select **File System** for **Web Server Logging**. Optionally enable **Application logging**. - ![enable logging](https://user-images.githubusercontent.com/3605364/183529287-f63d3e1c-ee5b-4ca1-bcb6-a8c29d8b26f5.png) -1. In the left pane, navigate to **Monitoring** > **Log stream**, and then select **Application logs** or **Web Server Logs**. - - ![Monitoring Log stream](https://user-images.githubusercontent.com/3605364/183561255-91f3d5e1-141b-413b-a403-91e74a770545.png) - - The following images shows the application logs output: - - ![app logs](https://user-images.githubusercontent.com/3605364/183528795-532665c0-ce87-4ed3-8e4d-4b374d469c2a.png) +If the problem can be reproduced locally, the Visual Studio debugger is a good choice. See [Visual Troubleshoot an app in Azure App Service using Visual Studio](/visualstudio/debugger/remote-debugging-azure) to troubleshoot on Azure. -Streaming logs have some latency and might not display immediately. +The following tools can be used to diagnose problems: -### z Application Event Log (Azure App Service) + +* Azure App Services stream diagnostics logs, see [Enable diagnostics logging for apps in Azure App Service](/azure/app-service/web-sites-enable-diagnostic-log). The following list shows how to enable logging for different categories: + * [ASP.NET Core categories](/aspnet/core/fundamentals/logging#aspnet-core-categories) + * + * + * + Streaming logs have latency and typically take many seconds to appear. +* Application Event Logs: + 1. Navigate to the **App Service** blade in the Azure portal. + 1. Select **Diagnose and solve problems**. + 1. In the **Diagnostic Tools** tile, select **Application Event Logs**. +* Kudu console: See the [Kudu wiki](https://github.com/projectkudu/kudu/wiki) and [Kudu service overview](/azure/app-service/resources-kudu). The Kudo wiki provides information on how to download logs. +* Availability and Performance: The [Availability and Performance](/azure/app-service/overview-diagnostics#troubleshooting-categories) tile in [Diagnose and solve problems](/azure/app-service/overview-diagnostics) -An alternative to using the **Diagnose and solve problems** blade is to examine the Application Event Log file directly using [Kudu](https://github.com/projectkudu/kudu/wiki): +Many startup errors don't produce useful information in the Application Event Log. Runing the app in the [Kudu](https://github.com/projectkudu/kudu/wiki) Remote Execution Console often provides error information -1. Open **Advanced Tools** in the **Development Tools** area. Select the **Go→** button. The Kudu console opens in a new browser tab or window. -1. Using the navigation bar at the top of the page, open **Debug console** and select **CMD**. -1. Open the **LogFiles** folder. -1. Select the pencil icon next to the `eventlog.xml` file. -1. Examine the log. Scroll to the bottom of the log to see the most recent events. - -### z Run the app in the Kudu console +## Connection reset -Many startup errors don't produce useful information in the Application Event Log. You can run the app in the [Kudu](https://github.com/projectkudu/kudu/wiki) Remote Execution Console to discover the error: +If an error occurs after the headers are sent, it's too late for the server to send a **500 Internal Server Error** when an error occurs. This often happens when an error occurs during the serialization of complex objects for a response. This type of error appears as a *connection reset* error on the client. [Application logging](xref:fundamentals/logging/index) can help troubleshoot these types of errors. -1. Open **Advanced Tools** in the **Development Tools** area. Select the **Go→** button. The Kudu console opens in a new browser tab or window. -1. Using the navigation bar at the top of the page, open **Debug console** and select **CMD**. #### z Test a 32-bit (x86) app From 06bdeee34915860f88178d2ce88b00f5fab91584 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:56:48 -1000 Subject: [PATCH 5/5] refactor --- aspnetcore/test/troubleshoot-azure-iis.md | 80 ++--------------------- 1 file changed, 4 insertions(+), 76 deletions(-) diff --git a/aspnetcore/test/troubleshoot-azure-iis.md b/aspnetcore/test/troubleshoot-azure-iis.md index 2f5add79bcad..11ee40beccf2 100644 --- a/aspnetcore/test/troubleshoot-azure-iis.md +++ b/aspnetcore/test/troubleshoot-azure-iis.md @@ -536,6 +536,7 @@ See [Kudu](https://github.com/projectkudu/kudu/wiki) for information on download 1. In the **Diagnostic Tools** tile, select **Application Event Logs**. * Kudu console: See the [Kudu wiki](https://github.com/projectkudu/kudu/wiki) and [Kudu service overview](/azure/app-service/resources-kudu). The Kudo wiki provides information on how to download logs. * Availability and Performance: The [Availability and Performance](/azure/app-service/overview-diagnostics#troubleshooting-categories) tile in [Diagnose and solve problems](/azure/app-service/overview-diagnostics) +* When an app responds slowly or hangs on a request, see [Troubleshoot slow web app performance issues in Azure App Service](/azure/app-service/app-service-web-troubleshoot-performance-degradation). Many startup errors don't produce useful information in the Application Event Log. Runing the app in the [Kudu](https://github.com/projectkudu/kudu/wiki) Remote Execution Console often provides error information @@ -543,82 +544,11 @@ Many startup errors don't produce useful information in the Application Event Lo If an error occurs after the headers are sent, it's too late for the server to send a **500 Internal Server Error** when an error occurs. This often happens when an error occurs during the serialization of complex objects for a response. This type of error appears as a *connection reset* error on the client. [Application logging](xref:fundamentals/logging/index) can help troubleshoot these types of errors. +#### 32-bit and 64-bit mismatch -#### z Test a 32-bit (x86) app +In the Azure Portal, navigate to the App Service and check **Settings > Configuration > Platform settings**. Ensure that the platform architecture matches the architecture of the app deployment (32-bit or 64-bit). -**Current release** - -1. `cd d:\home\site\wwwroot` -1. Run the app: - * If the app is a [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-deployments-fdd): - - ```dotnetcli - dotnet .\{ASSEMBLY NAME}.dll - ``` - - * If the app is a [self-contained deployment](/dotnet/core/deploying/#self-contained-deployments-scd): - - ```console - {ASSEMBLY NAME}.exe - ``` - -The console output from the app, showing any errors, is piped to the Kudu console. - -**Framework-dependent deployment running on a preview release** - -*Requires installing the ASP.NET Core {VERSION} (x86) Runtime site extension.* - -1. `cd D:\home\SiteExtensions\AspNetCoreRuntime.{X.Y}.x32` (`{X.Y}` is the runtime version) -1. Run the app: `dotnet \home\site\wwwroot\{ASSEMBLY NAME}.dll` - -The console output from the app, showing any errors, is piped to the Kudu console. - -#### z Test a 64-bit (x64) app - -**Current release** - -* If the app is a 64-bit (x64) [framework-dependent deployment](/dotnet/core/deploying/#framework-dependent-deployments-fdd): - 1. `cd D:\Program Files\dotnet` - 1. Run the app: `dotnet \home\site\wwwroot\{ASSEMBLY NAME}.dll` -* If the app is a [self-contained deployment](/dotnet/core/deploying/#self-contained-deployments-scd): - 1. `cd D:\home\site\wwwroot` - 1. Run the app: `{ASSEMBLY NAME}.exe` - -The console output from the app, showing any errors, is piped to the Kudu console. - -**Framework-dependent deployment running on a preview release** - -*Requires installing the ASP.NET Core {VERSION} (x64) Runtime site extension.* - -1. `cd D:\home\SiteExtensions\AspNetCoreRuntime.{X.Y}.x64` (`{X.Y}` is the runtime version) -1. Run the app: `dotnet \home\site\wwwroot\{ASSEMBLY NAME}.dll` - -The console output from the app, showing any errors, is piped to the Kudu console. - -### z ASP.NET Core Module stdout log (Azure App Service) - -> [!WARNING] -> Failure to disable the stdout log can lead to app or server failure. There's no limit on log file size or the number of log files created. Only use stdout logging to troubleshoot app startup problems. -> -> For general logging in an ASP.NET Core app after startup, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). - -The ASP.NET Core Module stdout log often records useful error messages not found in the Application Event Log. To enable and view stdout logs: - -1. In the Azure Portal, navigate to the web app. -1. In the **App Service** blade, enter **kudu** in the search box. -1. Select **Advanced Tools** > **Go**. -1. Select **Debug console > CMD**. -1. Navigate to *site/wwwroot* -1. Select the pencil icon to edit the *web.config* file. -1. In the `` element, set `stdoutLogEnabled="true"` and select **Save**. - -Disable stdout logging when troubleshooting is complete by setting `stdoutLogEnabled="false"`. - -For more information, see . - - - -### z ASP.NET Core Module debug log (Azure App Service) +![Platform settings image](https://github.com/user-attachments/assets/ad0673a4-57df-4cd4-87c2-d178c9792497) The ASP.NET Core Module debug log provides additional, deeper logging from the ASP.NET Core Module. To enable and view stdout logs: @@ -647,9 +577,7 @@ For more information, see > For general logging in an ASP.NET Core app after startup, use a logging library that limits log file size and rotates logs. For more information, see [third-party logging providers](xref:fundamentals/logging/index#third-party-logging-providers). -### z Slow or hanging app (Azure App Service) -When an app responds slowly or hangs on a request, see [Troubleshoot slow web app performance issues in Azure App Service](/azure/app-service/app-service-web-troubleshoot-performance-degradation). ### z Monitoring blades