7

I have a Windows 7 virtual machine in VMWare that I'm using to develop ASP.NET MVC 5 Web applications with the default IIS Express server. I like to keep my projects saved on an external hard drive which I can access in the virtual machine through a shared folder / network drive. However, when I run my applications, IIS Express cannot access my web.config files in the project directory. It's looking in the right folder so I'm pretty sure this is a permissions issue. How can I grant IIS Express file access to the files on my network drive?

Things I've tried

  • Running Visual Studio as an administrator
  • Setting iisexpress.exe to always run as an administrator
  • Looking around in the applicationhost.config file
  • Attempting to set write permissions on the network drive (right click on the drive and go to properties but no "Security" tab available)
  • A few other things that I can't remember that I tried during the hours of searching for a solution

Known last resorts that I'd prefer to avoid

  • Copying the project files from the external hard drive to the VM's storage space and vice versa

  • Running the projects on a full IIS server

Other things to know

  • Using Visual Studio 2013 and MVC 5

  • Using IIS Express 7.5

  • VMWare Workstation 11

  • The virtual machine is also on the external hard drive, so I can't connect the usb to the guest, I need to access the rest of the hard drive through shared folders (although doubtful, maybe partitioning the hard drive would fix this?)

  • Guest OS is Windows 7 Professional

  • Host OS is Debian Jessie RC1

  • External HDD is formatted as NTFS, although it shows up as HGFS on the network drive

  • I can read and write to files on the network drive, it's just IIS Express that is having trouble

  • Programs don't have permissions, users do. If the user account that IIS Express is running under (usually your own) can access the files via explorer, then it's not a permissions issue. – Damien_The_Unbeliever Feb 13 '15 at 07:41

2 Answers2

4

VMware/VirtualBox's shared folder between the guest and host is kind of using mapped drive feature of Windows. However, neither IIS nor IIS Express supports mapped drives. If possible, use a sync tool, such as Dropbox, or simply Git to share bits between the two.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • It looks like that's what it has come down to. Thanks for the answer – Garrett S Holbrook Feb 13 '15 at 13:03
  • @GarrettSHolbrook, if it did help you, please accept the answer. – Lex Li Jun 18 '15 at 13:57
  • 1
    A peer-to-peer sync tool such as [Resilio Sync](https://www.resilio.com/individuals/) should (in theory) be faster than DropBox. – Jonathan May 23 '17 at 03:01
  • Update: I've applied Resilio Sync to this problem and it's working marvellously! I'm now able to work, commit and push from a regular folder in MacOS and the changes are automatically synced to a folder on the VM, where they can be built with `MSBuild` and are served by IIS. – Jonathan May 26 '17 at 04:56
0

I just had a similar issue to this, and what I found was that when you specify your physical path in IIS as a mapped drive, e.g. Z:\shared-folder IIS fails with HTTP 500 error.

However is you specify the path like this: \\vmware-host\Shared Folders\shared-folder then suddenly it works and the app has all the permissions to write to files.

This works both in IIS and IISExpress.

dmitrybelyakov
  • 3,709
  • 2
  • 22
  • 26