0

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!

  • Mapped drives are not supported by IIS. – Lex Li Sep 22 '22 at 03:34
  • IIS is the server side and the client is mapping the WebDav folder to a network drive (very successfully) so I'm not sure what your comment means in this context. Visual Studio seems to be trying to load a virtual directory from the vb.proj file but is running into problems with the applicationHost.config. Could you elaborate? – Trip Derham Sep 22 '22 at 05:18
  • 1) You save source code on a mapped drive. 2) VS loads the project files from there and attempts to configure IIS accordingly to point to some of the folders/files. That's where the error comes as mapped drives cannot be used to serve the contents. It has nothing to do with things like `applyToWebDAV`. – Lex Li Sep 22 '22 at 06:27
  • Ive worked before with projects stored on a server and opened/worked on.the projects on a mapped network drive (albeit on the local network). I'm not sure how this is any different. – Trip Derham Sep 22 '22 at 10:10
  • There is no difference. IIS never supports mapped drives, so if mapped drives worked for you with IIS/VS sometimes you were just lucky. But you should never expect that luck will last. – Lex Li Sep 22 '22 at 14:51

1 Answers1

1

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

<UseGlobalApplicationHostFile>true</UseGlobalApplicationHostFile>
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
vibstudio
  • 26
  • 2