Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsTo make IIS show custom HTTP error messages, configure the <httpErrors> section under <system.webServer>. For a safer production setup, use errorMode="DetailedLocalOnly": requests from the server itself can show diagnostic details, while remote visitors receive configured custom pages. Avoid leaving detailed errors enabled for every visitor.
Choose the right IIS error setting
IIS’s <httpErrors> section controls HTTP errors generated by IIS. ASP.NET’s <customErrors> section is separate, so first identify which layer produced the response. Microsoft documents <httpErrors> for IIS 7.0 and later; IIS 6.0 uses a different metabase property. See the IIS HTTP Errors configuration reference.
The errorMode value determines who sees detailed errors and who sees custom responses:
| Setting | Effect | When to use it |
|---|---|---|
DetailedLocalOnly |
Detailed errors for local requests; custom errors for remote requests. This is the documented default. | Recommended for troubleshooting while limiting information shown to visitors. |
Custom |
Custom errors for all requests, including local ones. | When friendly error pages should be shown universally. |
Detailed |
Detailed errors for all requests. | Only for temporary troubleshooting when access is controlled; detailed responses can expose sensitive information. |
Microsoft explains that DetailedLocalOnly permits local troubleshooting without exposing sensitive information to external browsers in its HTTP errors troubleshooting guide.
#1 Best Overall
- 3.5 Inch Hot Plug Hard Drive PowerEdge T340 Tower Server Chassis
- Microsoft Windows Server 2019 Standard Operating System
- Processors: Intel Xeon E-2124 Quad-Core 3.3GHz 8MB CPU, Up To 4.3GHz Turbo
- Memory: 32GB (2 x 16GB) DDR4 PC4-21300 2666MHz Unbuffered Memory
- Hard Drive: 8TB (4 x 2TB) 7.2K RPM 6Gb/s SATA 3.5 Inch HDDs in RAID
Configure a custom error page
You can configure IIS at the server level in ApplicationHost.config, or at site or application scope in Web.config, subject to the configuration delegation and inheritance rules for that server. The following example keeps detailed errors local and serves a static file for HTTP 500:
<configuration>
<system.webServer>
<httpErrors errorMode="DetailedLocalOnly" defaultResponseMode="File">
<remove statusCode="500" />
<error statusCode="500" path="C:inetpubcusterr500.htm" responseMode="File" />
</httpErrors>
</system.webServer>
</configuration>
- Save a valid error page at the specified path, or change the path to the file you intend to serve.
- Add the
<httpErrors>configuration at the appropriate server, site, or application scope. - Use
<remove statusCode="500" />when an inherited entry for that status needs to be removed before adding your own mapping. - Trigger a 500 error and check the response locally and from a remote client to confirm each receives the intended content.
For language-specific files, Microsoft’s configuration reference also documents prefixLanguageFilePath and corresponding error-file entries. Make sure paths and configuration scope are valid for the deployed IIS version.
Rank #2
- Windows server license is not included
Select how IIS delivers the page
Each <error> entry can match a status code and, where needed, a substatus. Its responseMode determines what IIS does with the configured path:
File: serves a static file.ExecuteURL: executes an internal, server-relative URL.Redirect: redirects the client to an absolute URL.
These path formats are not interchangeable. Use a filesystem path for a file response, an internal server-relative path for ExecuteURL, and an absolute URL for Redirect. See Microsoft’s configuration reference for the accepted settings and examples.
Recommended Free Tools
Rank #3
- MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
- READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
- WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
- INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
- EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance
Decide whether IIS replaces an existing response
If application code or a module has already supplied an error response, the existingResponse setting controls whether IIS keeps or replaces it. The setting is especially important when the custom page appears not to take effect:
| Value | Behavior |
|---|---|
PassThrough |
Preserves the existing response. |
Replace |
Replaces the existing response with the configured error response. |
Auto |
Lets IIS apply its rules based on the error mode, existing response content, and whether the module requested that IIS skip custom errors. |
Microsoft documents the behavior in the HTTP Errors reference. If the application returns its own error body, check this setting and the application’s error handling rather than assuming IIS will overwrite the response.
Quick Recap
Rank #4
- This Certified Refurbished product is tested and certified to look and work like new. The refurbishing process includes functionality testing, basic cleaning, inspection, and repackaging. The product ships with all relevant accessories, a minimum 90-day warranty, and may arrive in a generic box. Only select sellers who maintain a high-performance bar may offer Certified Refurbished products on Amazon.com.
- Dell Optiplex 3050 SFF Desktop computer PC, Intel Quad Core i5-6500 up to 3.6GHz, 16GB DDR4, 256GB SSD
- Includes: USB Keyboard & Mouse, USB WiFi adapter, Microsoft office 30 days free trail.
- Port: Front: USB 3.0(2), USB 2.0(2); Rear: DP, HDMI, USB 3.0(2), USB 2.0(2), RJ-45.
- Support 4K (3840x2160) Dual display, makes it easy to connect two monitors at the same time, and you can expand working Windows, mirror content, or expand a single window across multiple monitors.
Troubleshoot when the custom message does not appear
- Record the status and substatus. Reproduce the problem locally and note both values. A 404 substatus can distinguish causes such as an unmapped extension, missing handler, filtering rule, or hidden file.
- Identify which layer generated the response. IIS
<httpErrors>and ASP.NET<customErrors>are separate settings; changing one will not necessarily change errors produced by the other. - Check error handling and response preservation. Review
errorModeandexistingResponse, and determine whether application code supplied a body or asked IIS to skip custom errors. - Validate the matching entry. Confirm the status code and any substatus match, and that the entry’s response mode and path use the correct format.
- Trace failures that are hard to reproduce. Configure Failed Request Tracing for the relevant failure condition, then inspect the captured events. Microsoft notes that it can capture useful tracing information for intermittent or difficult-to-reproduce errors in its Failed Request Tracing guide.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

