This happened to us when the IIS application has a Virtual Directory with a Physical Path that contains forward-slashes / instead of backslashes \. This was accidentally done using a powershell management API for IIS during our continuous delivery process.
Bad Config Example - applicationHost.config
<application path="/MySite/MyService" applicationPool="MyAppPool" enabledProtocols="http"><virtualDirectory path="/" physicalPath="C:\inetpub\MySite/MyService" /></application>
Make sure the physicalPath
attribute does not contain forward-slashes /, only backslashes \
Corrected Config Example - applicationHost.config
<application path="/MySite/MyService" applicationPool="MyAppPool" enabledProtocols="http"><virtualDirectory path="/" physicalPath="C:\inetpub\MySite\MyService" /></application>