You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/developer/webapps/iis/site-behavior-performance/troubleshoot-http-error-code.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
-
title: Troubleshoot HTTP Errors in IIS
2
+
title: Troubleshoot 4xx and 5xx HTTP Errors in IIS
3
3
description: Provides troubleshooting steps for resolving 4xx and 5xx HTTP status code errors in Internet Information Services (IIS).
4
4
ms.date: 01/27/2025
5
5
ms.reviewer: khgupta, v-sidong
6
6
ms.custom: sap:Site Behavior and Performance\Runtime errors and exceptions, including HTTP 400 and 50x errors
7
7
---
8
8
# Troubleshoot 4xx and 5xx HTTP errors
9
9
10
-
This article provides troubleshooting steps for resolving [4xx](../health-diagnostic-performance/http-status-code.md#4xx---client-error) and [5xx](../health-diagnostic-performance/http-status-code.md#5xx---server-error) HTTP status code errors in Internet Information Services (IIS). These errors can indicate issues on the client or server side. The guidance will help you identify the cause of these errors and resolve them effectively.
10
+
This article provides troubleshooting steps for resolving [4xx](#identify-4xx-errors) and [5xx](#identify-5xx-errors) HTTP status code errors in Internet Information Services (IIS). These errors can indicate issues on the client or server side. The guidance will help you identify the cause of these errors and resolve them effectively.
11
11
12
12
## Identify 4xx errors
13
13
14
-
The 4xx HTTP status codes indicate that an error occurred due to a client-side issue. For example, For example, the client browser might have requested a page that doesn't exist, or the client browser might not have provided valid authentication information.
14
+
The 4*xx* HTTP status codes indicate that an error occurred due to a client-side issue. For example, For example, the client browser might have requested a page that doesn't exist, or the client browser might not have provided valid authentication information.
15
15
16
-
To identify 4xx errors, examine the [IIS logs](#examine-the-iis-logs) and the [HTTPERR logs](#examine-the-httperr-logs):
16
+
To identify 4*xx* errors, examine the [IIS logs](#examine-the-iis-logs) and the [HTTPERR logs](#examine-the-httperr-logs):
17
17
18
18
- The HTTP status code is recorded in the IIS logs. This file is usually stored in **C:\inetpub\logs\Logfiles** but can be configured via IIS **Logging** in IIS Manager.
19
19
- A 4*xx* error code can be generated by the **HTTP.sys** kernel driver, which means these requests might not reach IIS and thus won't be logged in IIS logs. **HTTP.sys** logs these errors in separate files called [HTTPERR logs](/windows/win32/http/error-logging-in-the-http-server-api). This file is usually stored in **C:\Windows\System32\LogFiles\HTTPERR** but can be configured via the registry `HKEY\LOCAL\MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\ErrorLoggingDir`.
@@ -33,7 +33,7 @@ If you find errors in the HTTPERR logs, note the reason (`s-reason`) and see [Ty
33
33
34
34
## Identify 5xx errors
35
35
36
-
The 5xx HTTP status codes indicate that the server couldn't complete the request because the server encountered an error when processing the request. Use the following instructions based on your application type.
36
+
The 5*xx* HTTP status codes indicate that the server couldn't complete the request because the server encountered an error when processing the request. Use the following instructions based on your application type.
37
37
38
38
### 500 errors in classic ASP
39
39
@@ -77,6 +77,8 @@ If a 500 error occurs in ASP.NET, use the following methods to identify the caus
77
77
78
78
Check the Application Event Logs around the time the issue occurred. ASP.NET will log the details of the error, including the call stack, in the Application Event Logs.
79
79
80
+
[!INCLUDE [Access the Application Event Logs](../../../../includes/access-application-event-logs.md)]
81
+
80
82
- Capture memory dumps.
81
83
82
84
In some cases, it might be necessary to capture a memory dump of a specific exception to examine the details surrounding the exception that caused the 500 HTTP status.
@@ -111,10 +113,7 @@ If a 500 error occurs in ASP.NET Core, use the following methods to identify the
111
113
112
114
To access the Application Event Logs, follow these steps:
113
115
114
-
1. Open the **Start** menu, search for **Event Viewer**, and select **Event Viewer**.
115
-
1. In **Event Viewer**, open the **Windows Logs** node.
116
-
1. Select **Application** to open the Application Event Logs.
117
-
1. Search for errors associated with the failed application. The value in the **Source** column for the errors is **IIS AspNetCore Module** or **IIS Express AspNetCore Module**.
116
+
[!INCLUDE [Access the Application Event Logs](../../../../includes/access-application-event-logs.md)]
118
117
119
118
- Enable the [Developer Exception Page](/aspnet/core/fundamentals/error-handling#developer-exception-page).
120
119
@@ -258,7 +257,7 @@ Before the issue occurs, follow these steps to configure PerfView and Procdump f
258
257
1. Download the [PerfView](https://github.com/microsoft/perfview/releases) tool on the server. It's a profiler tool that captures Event Tracing for Windows (ETW) events (no installation required).
259
258
1. For PerfView to provide useful information, add **Tracing** as a **Role Service** for IIS. Without **Tracing** enabled, an ETW trace will only include **HTTP.sys** information. If you aren't sure whether the **Tracing** role service is installed, follow these steps:
260
259
261
-
[!INCLUDE [Note when using Procdump](../../../../includes/enable-tracing-role.md)]
260
+
[!INCLUDE [Install the Tracing role service](../../../../includes/enable-tracing-role.md)]
262
261
263
262
1. Open the PerfView tool, select the **Collect** menu, and select the **Collect** option.
264
263
1. Select the **Zip**, **Merge**, and **Thread Time** checkboxes, as shown in the following screenshot. Modify the **Circular MB** field to **2000**:
@@ -300,3 +299,8 @@ During the time of the issue, follow these steps to collect data:
300
299
- This command will capture three sets of dumps at 10-second intervals.
301
300
302
301
1. Once the dumps are collected by procdump, stop PerfView by selecting **Stop collection**, or wait two and a half minutes for it to stop automatically. Allow PerfView to merge the collected data, which might take some time. And it will generate a **Perfview.etl.zip** file. If you're prompt for symbols, select **Use Microsoft Symbol Servers**.
To access the Application Event Logs, follow these steps:
2
+
3
+
1. Open the **Start** menu, search for **Event Viewer**, and select **Event Viewer**.
4
+
1. In **Event Viewer**, open the **Windows Logs** node.
5
+
1. Select **Application** to open the Application Event Logs.
6
+
1. Search for errors associated with the failed application. The value in the **Source** column for the errors is **IIS AspNetCore Module** or **IIS Express AspNetCore Module**.
0 commit comments