I hope you can help as this is doing my noodle in!
I have IIS 10 running on Windows Server Essentials 2016. I've set up several websites with files stored in the inetpub folder and all works fine.
However, the C drive is getting full so I have moved the site files to the D drive and updated the sites physical paths, changed the path credentials to a specific user with read/write access to the folders and have set the default document to index.html
This works fine when viewing http://mysite.local/index.html however, http://mysite.local/ gives an error 401:
401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied.
Any ideas? Moving the files etc back to the C drive works fine, just not the D drive... The rest of the site works fine on the D drive, just not the default document... This is the same for both the local server and remote PC's.
Thanks in advance!
(Copied from the comment)
Mapped drives are not supported by IIS/IIS Express (as well as other Microsoft products when applicable).
So in your case, the first thing is to switch to UNC path. Then certain weird issues can be resolved automatically.
Reference https://blog.lextudio.com/the-most-common-technologies-not-supported-by-microsoft-8675c409bde2