Search code examples
asp.netvmwarefile-permissionsiis-expressnetwork-drive

Grant IIS Express permission to access network drive in VMWare


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


Solution

  • 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.