The curious case of IIS that wouldn't serve content from a drive other than C:
In this case, it was with a Windows Server 2012 installation on a VMWare guest. The setup was quite unexciting:
- Freshly installed Windows Server 2012 box
- IIS installed
- A second site configured in IIS to point to W:\Sites\mysite.local, with a binding to the host header "mysite.local"
- Appropriate DNS/HOSTS file entries on another machine to allow it to browse to the second site
Any attempt to browse to this site resutled in a 500 - Internal server error message ('scuse the Internet Explorer, there were unrelated reasons):
This is mirrored in the IIS log files:
#Date: 2018-02-22 00:00:55 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2018-02-22 00:00:55 10.1.1.2 GET / - 80 - 10.1.2.2 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 500 19 5 217
The more detailed version of the error page, when run on the machine itself:
The key bits of text from this (to help people searching who may want to find this) are:
- HTTP Error 500.19
- Config Error: Cannot read configuration file due to insufficient permissions
- Error Code: 0x80070005
So, what fixed it?
The short answer is, installing Update for Windows Server 2012 (KB2822241). The longer answer came about from finding a knowledge base article titled Various problems may occur when running SQL Server 2012 in Hyper-V or VMWare environment which describes a very similar set of symptoms for SQL Server 2012 on Windows Server 2012.
To protect against link-rot, the steps that are outlined for resolution in that KB article are:
- Install the cumulative update that is described in the following article in the Microsoft Knowledge Base:
2811670 Issues when the Audit object access policy is enabled on Removable Storage in Windows 8 or Windows Server 2012 - Restart the Portable Device Enumerator Service.
- Force an update of group policy. To do this, type the following at an administrative command prompt and then press Enter:
gpupdate /force - Restart the guest virtual machine two times for the change to take effect.
When I did this, the Portable Device Enumerator Service wasn't running so I started it, stopped it, started it and stopped it again for good measure. It's interesting to note that I attempted to access the site in between the two reboots called for in step 4, the site still returned an Internal server error so the two reboots are definitely required. Why? I don't know, but I would love to!
So the moral of this story probably should be, don't do anything with a pristine Windows Server 2012 image until you've run Windows Update and applied all updates - KB2822241 is from April 2013 so isn't exactly recent! What. A. Weird. Bug!