Firstly the solutions I have found yet in various websites, are for older Visual Studio versions.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
Creation of the virtual directory http://localhost:2648/ failed with the error:
Filename: \\?\Z:\Test Projects\WebApplication1\.vs\config\applicationhost.config
Error: Cannot read configuration file
I have made a workaround for the issue. I have both a local folder and a shared folder for the same ASP.NET project. I always open the
SLN file (project solution file for Visual Studio) from the local folder in the VM. I periodically run a process in the VM to synchronize the changes in the both folders (local and shared) so that both folders can contain exactly same files. I actually use FreeFileSync app for it. In this workaround, file merge conflict may occur if same files are edited both in the VM and the host before last synchronization. In this case I can review the changes in the conflicted files to resolve conflict. My answer is really a workaround but it works.