Grant IIS Express permission to access network drive in VMWare

淺唱寂寞╮ 提交于 2020-01-03 09:57:29

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/28493315/grant-iis-express-permission-to-access-network-drive-in-vmware

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!