Search code examples
visual-studioiisconfiguration-fileswebdavvirtual-directory

Visual Studio Projects Fail to Load over WebDav Mapped Network Drive


I recently set up a WebDav server on my network in New York so I can access web projects from my office in California. Everything appears to be working except that I can't get any Visual Studio projects stored in the WebDav folder to load. I have a network drive (E:/) mapped to the WebDav, all the files are showing up, but every time I open a project/solution I get an error indicating that

"the creation of the virtual directory failed with the error: Filename: [path of the applicationHost.config file] Error: Cannot read configuration file You will need to manually create this virtual directory in IIS before you can open this project."

error message

I've checked the Request Filtering in the IIS applicationHost.config file to ensure that all the applyToWebDAV properties are false, removed the ISAPI filters, I've tried the same projects copied to my local hard drive and they open fine, I've tried creating new projects on the WebDav network drive and they still crash... I'm not sure what else to try. I can't even get the error message to change, other than the port number, and I've been troubleshooting this for five hours now.

Any help would be greatly appreciated!


Solution

  • To solve the problem, the UseGlobalApplicationHostFile attribute must be set to true in the project file to be opened.

    <UseGlobalApplicationHostFile>true</UseGlobalApplicationHostFile>