If I use bash (from Ubuntu 18.04 running via Windows Subsystem for Linux) to create a directory under my Windows profile:
$ mkdir /mnt/c/Users/mdmower/source/repos/WebBash
then IIS 10 is unable to read Web.config
directly under that directory. As a minimal example, try putting this simple Web.config
into a directory created by Windows Explorer as well as another directory created by bash:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<clear />
</handlers>
</system.webServer>
</configuration>
Now, add a website in IIS 10 that points to the directory created in Windows. After adding the website, visit the Handlers Mapping section. You should see it is cleared out (this is the sole function of the sample Web.config
). Change the source directory of the website to the directory created in bash. The Handlers Mapping section is no longer cleared.
While I would normally assume this is due to permissions, I cannot find a single difference in each directory's security settings (Properties > Security > Advanced). The unix permissions – which shouldn't matter anyways – are also identical for the two directories (drwxrwxrwx
). PowerShell's Get-ItemProperty reports that both directories have the same mode (d-----
) and no LinkType.
Why can't IIS 10 read from the directory created with bash?
Software versions:
Windows 10 x64 Version 1803 (OS Build 17134.320)
IIS 10 Version 10.0.17134.1