I have a WordPress installation using IIS7.  This site is configured to use the custom permalink url structure like /%category%/%postname%/ .

This structure works well, and I am able to request pages, however on these pages I have images inserted using the url image that wordpress provides. Eg

The image fail to load, and when I try to access the image directly, I get the result:

HTTP Error 500.50 – URL Rewrite Module Error.

Module RewriteModule
Notification BeginRequest
Handler StaticFile
Error Code 0x80070005
Requested URL
Physical Path C:\inetpub\…\wp-content\uploads\2009\07\of_blockdevice.png
Logon Method Not yet determined
Logon User Not yet determined


The image does exist, and the URL is correct. Other images on my site load just fine. At first I thought the problem was with my web.config file, but it’s NOT. After doing some digging I found on the IIS website that the problem is to do with file permissions. The correct and very useful solution is below:

“The image issue was a permission issue, but simply setting it manually on the original image file or parent folder is inadequate.  The behavior of WordPress is that it writes the original file using IUSR to a temporary system directory that is defined in the PHP.ini file.  This temp folder does not have IIS_IUSRS permissions on it, so when windows moves this file from the temp folder to the application’s upload folder, its final home, IIS_IUSRS only has read permissions, so the permissions are not inherited from the file’s parent folder.”

To fix this, there are two solutions.

1. Change the permissions on the temp folder giving IIS_IUSRS write/modify.

2. Change the path of the temp folder in the PHP.ini file to a folder that does have IIS_IUSRS write/modify permission.

Here is a good source detailing the problem:

I chose to move the temp folder in my PHP.ini to C:\inetpub\temp\uploads and also give it permissions.

After uploading an image in wp-admin, I was able to access the image (original, not resized) from a browser wihout the 500.50 error.


IIS_ISZ you’re a star