Users Pricing

blog

Home Blogs What IIS Errors 401, 403, 404 and 503 Mean and How to Fix Them – MindStick
What IIS Errors 401, 403, 404 and 503 Mean and How to Fix Them

What IIS Errors 401, 403, 404 and 503 Mean and How to Fix Them

Gaurav Verma 45 19 Nov 2026

IIS error pages are frustratingly vague. “403 – Forbidden: Access is denied.” Denied by what? Which file? Which setting?

The good news is that IIS records much more detail than it shows visitors. Once you know where to look, most errors point straight to their cause.

First, find the real error

1. Check the IIS logs

By default, IIS logs are in:

C:\inetpub\logs\LogFiles\W3SVC<site-id>\

Each request line ends with fields like:

GET /reports/index.aspx - 443 - 203.0.113.25 Mozilla/5.0... - 403 14 0 15

Those last numbers are the key:

  • sc-status 403: the HTTP status
  • sc-substatus 14: the sub-status code, which tells you the specific reason
  • sc-win32-status 0: a Windows error code (5 means access denied, 64 means the network name is no longer available, and so on)
  • time-taken in milliseconds

The sub-status is the most useful clue. 403.14 and 403.4 are completely different problems.

2. See detailed errors safely

On the server itself, browse to the site at http://localhost. By default, IIS shows detailed errors to local requests and generic ones to remote visitors. Don’t switch detailed errors on for everyone in production; they reveal internal paths.

3. Use Failed Request Tracing

For tricky problems, enable Failed Request Tracing in IIS Manager for the site, add a rule for the status code (for example 401 or 500–599), reproduce the error, and open the generated XML in a browser. It shows each step of the request pipeline, including which module returned the error.

4. Check the Event Viewer

Windows Logs → Application and System often contain the reason an application pool crashed or an ASP.NET app failed.

401 – Unauthorized

A 401 means authentication failed or didn’t happen. IIS doesn’t know who the user is, or rejected their credentials.

Sub-statusMeaning
401.1Logon failed (wrong username or password)
401.2Logon failed due to server configuration (no authentication method enabled that the browser can use)
401.3Unauthorised due to file system permissions (ACL)
401.4Authorisation failed by a filter
401.5Authorisation failed by an ISAPI/CGI application

How to fix:

  • Check Authentication settings for the site (IIS Manager → site → Authentication). A public site normally has Anonymous Authentication enabled. An intranet app might use Windows Authentication. If everything is disabled, you’ll get 401.2.
  • For 401.3, the anonymous user (by default the application pool identity, or IUSR depending on configuration) needs read permission on the site folder. See the permissions section below.
  • Windows Authentication prompting repeatedly? Check that the URL is in the browser’s Local Intranet zone, and that the correct providers (Negotiate, NTLM) are enabled. Kerberos problems often involve missing SPNs when using a custom host name or service account.
  • Note: A 401 response is normal as the first step of Windows Authentication. The browser then retries with credentials. Only worry if the final response is 401.

403 – Forbidden

A 403 means IIS knows the request but refuses to serve it.

Sub-statusMeaningUsual fix
403.14Directory listing deniedAdd a default document, or the app isn’t configured (see below)
403.4 / 403.16SSL required / client certificate issueUse HTTPS, or check SSL settings
403.6IP address rejectedCheck IP Address and Domain Restrictions
403.18Request can’t be executed in this application poolCheck app pool configuration for the URL
403.502–503Dynamic IP restriction / too many requestsReview Dynamic IP Restrictions limits

The most common one: 403.14. You browse to https://example.com/ and get “The Web server is configured to not list the contents of this directory.”

Causes:

  • No default document. Make sure index.html, default.aspx or similar exists, and is listed under Default Document.
  • ASP.NET Core app not wired up. If you deployed an ASP.NET Core app but the web.config with the aspNetCore handler is missing, IIS treats the folder as static files and returns 403.14. Check that web.config was published. (If web.config is there but the ASP.NET Core Hosting Bundle isn’t installed, you’ll usually see a 500.19 configuration error instead. Install the Hosting Bundle for your .NET version, then run iisreset.)
  • Wrong physical path. The site points to the parent folder rather than the published output folder.

Folder permissions. For 403 errors with sc-win32-status 5 (access denied), grant read access:

icacls "D:\Sites\MyApp" /grant "IIS AppPool\MyAppPool:(OI)(CI)RX"

Replace MyAppPool with your application pool name. Add Modify rights only to specific folders the app must write to, such as logs or uploads. Never give write access to the whole site.

404 – Not Found

A 404 means IIS couldn’t find anything to serve for that URL. Sub-statuses are especially helpful here:

Sub-statusMeaning
404.0File or directory not found
404.2ISAPI or CGI restriction (handler not allowed)
404.3MIME type restriction (no MIME type for this extension)
404.4No handler configured
404.5URL sequence denied by request filtering
404.7File extension denied by request filtering
404.8Hidden segment denied (for example /bin or /App_Data)
404.11Double escaping denied
404.13Content length too large
404.15Query string too long

Common fixes:

  • 404.0: Check the file exists, the URL is spelled correctly (IIS isn’t case-sensitive, but your app’s routes might be), and the physical path is right. For single-page apps (Angular, React), configure a URL Rewrite rule that sends unknown routes to index.html.
  • 404.3: Static files like .webp, .woff2, .json or .apk need a MIME type. Add one in IIS Manager → MIME Types, or in web.config:
  • <system.webServer> <staticContent> <remove fileExtension=".webp" /> <mimeMap fileExtension=".webp" mimeType="image/webp" /> </staticContent> </system.webServer>
  • 404.13: Large file uploads exceed maxAllowedContentLength (default about 28.6 MB). Increase it in Request Filtering:
  • <security> <requestFiltering> <requestLimits maxAllowedContentLength="104857600" /> </requestFiltering> </security>
  • ASP.NET Core also has its own limits (for example Kestrel and form options), so check those too.
  • 404.11: URLs containing encoded characters like %2B (a plus sign) can trigger double-escaping protection. Change the URL design if possible, or carefully allow double escaping for that path.

503 – Service Unavailable

A 503 usually means the application pool isn’t running, so IIS has nothing to hand the request to.

Check the application pool. In IIS Manager → Application Pools, is it Stopped? Start it, then watch whether it stops again.

If it keeps stopping, IIS’s Rapid-Fail Protection has disabled it after repeated crashes (by default, 5 failures within 5 minutes). Find the cause:

  • Event Viewer → System and Application logs for WAS and application errors.
  • Wrong identity password. If the pool runs as a domain or local account whose password changed, it can’t start. Update the identity in Advanced Settings.
  • Missing runtime. The required .NET Framework version or ASP.NET Core Hosting Bundle isn’t installed.
  • 32-bit vs 64-bit mismatch. An app depending on 32-bit DLLs needs Enable 32-Bit Applications set to True.
  • Bad configuration. A malformed web.config or applicationHost setting can stop the pool from starting.

Other 503 causes:

  • Queue full (503.2 / 503.3): the app is overloaded or stuck. Check for slow database calls, deadlocks or thread starvation, and look at CPU and memory.
  • App pool recycling under heavy load or memory limits.
  • app_offline.htm left in the site folder after a deployment. Remove it.
  • HTTP.sys returns 503 when the URL reservation or binding doesn’t match a running site. Check site bindings and run netsh http show servicestate for clues.

A quick troubleshooting routine

  1. Reproduce the error and note the exact URL and time.
  2. Find the line in the IIS log: status, sub-status, win32 status.
  3. Look up the sub-status (tables above).
  4. Check Event Viewer for related errors.
  5. Use Failed Request Tracing if it’s still unclear.
  6. Change one thing at a time, and test again.

Final thoughts

IIS errors look cryptic on screen, but the server usually knows exactly what went wrong. The sub-status code in the log is the single most useful piece of information: 403.14 points to a default document or ASP.NET Core setup, 404.3 to a missing MIME type, 404.13 to upload limits, and 503 to an application pool that isn’t running.

Get into the habit of checking the logs first, and most IIS problems turn from guesswork into a five-minute fix.


Gaurav Verma

Node.js Developer at Amazon India

Hi, I am Gaurav. I work as a Node.js Developer at Amazon India and my work is mostly about Node.js backend services and REST APIs. Before this I spent 3 years at Tata Consultancy Services. I studied BCA from Jamia Millia Islamia, New Delhi and MCA from Loyola College, Chennai. I am originally from Lucknow, Uttar Pradesh. Weekends are for trekking.


Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md