Fixing IIS 500.19 Error for Static Files on Windows Server

|
| By Manoj Thakur

One of the most common and frustrating issues in IIS on Windows servers is the 500-Internal Server Error, which often appears with vague details, especially when serving static files. The IIS 500.19 Error occurs when the server configuration is invalid, causing this internal server error.

We recently encountered this problem when trying to load photographs from a particular location (such as /UploadedImage/).

The following error was displayed by the browser:

500 – Internal Server Error
The requested content cannot be accessed because the related configuration data is invalid.

Upon checking the IIS logs, we found the following entries:

2025-07-30 04:19:35 172.31.26.22 GET /UploadedImage/Screenshot+2024-08-09+080429.png - 443 - 137.59.87.220 ... 500 19 13
2025-07-30 04:43:00 172.31.26.22 GET /UploadedImage/Screenshot+2024-08-09+080429.png - 443 - 137.59.87.220 ... 500 19 13
2025-07-30 04:53:25 172.31.26.22 GET /UploadedImage/Screenshot+2024-08-09+080429.png - 443 - 137.59.87.220 ... 500 19 13

What does 500.19.13 mean?
In IIS:

  • 500.19 indicates a configuration error.
  • Sub-status 13 indicates a permissions or configuration problem in the web.config file or its folder. In other words, IIS is unable to access the folder or read its configuration data.

The Root Cause

We discovered that a web.config file was present inside the UploadedImage folder.
It either had invalid XML or contained restrictive rules, preventing IIS from serving files from that folder.

This caused IIS to block all requests to that directory, even for static files like images.

How We Fixed It

1. Removed the extra web.config from the UploadedImage folder.
Since this folder was only meant for serving static files, we didn’t need to keep any other file with the same name.

2. Checked folder permissions.
We made sure that IIS on Windows Server had permission to read the folder:

  • Right-click the UploadedImage folder → Properties → Security
  • Ensure IUSR and IIS_IUSRS accounts have Read & Execute permissions.

After removing the web.config and setting permissions, the image should be loaded successfully!

Key Takeaways

  • 500.19.13 is almost always a permissions or web.config issue.
  • Avoid unnecessary web.config files inside static file folders (images, uploads).
  • Always ensure IIS (IUSR and IIS_IUSRS) has at least read access to those folders.

By following these steps, we restored image serving from the UploadedImage folder and eliminated the 500 error.

Leave a Reply

Your email address will not be published. Required fields are marked *