IIS Application Using Shared Folder in VirtualBox VM

iis, iis-express, virtualbox

Solution

I had a very similar issue when setting up a vagrant box for Windows 2012 R2 with IIS for development purposes. From what I remember I was able to use the following as a workaround, but not something I would want to implement in a production environment:

- Make C:\vagrant a network share and set the permissions to be accessible by the user running IIS `\\localhost\vagrant`.

- Set the webroot for site to be the network share `\\localhost\vagrant`

In theory the following may work for your situation:

- Create a symlink to the network share, IE: `mklink /j "\\VBOXSVR\code" C:\code\`

- Make C:\code a network share accessible by IIS, `\\localhost\code`

- Make sure the user running IIS will have permissions to the network share

- Set the webroot for the site in IIS to the network share, `\\localhost\code`

(Optional) I added an entry into the host file (C:\Windows\System32\drivers\etc\host) for localhost. This appeared to improve performance, but it should not be necessary.

Hopefully this will point you in the right direction.

Problem

I've got a VirtualBox VM running Windows Server 2008 R2. The server is configured as a domain controller. I've got source code on my web application on the host machine. I shared a folder to the guest VM that contains the source code. I configured an IIS application on the Guest machine and pointed it to the share (\VBOXSVR\code). When I run the application, I get the following message: Module: IIS Web Core Notification: BeginRequest Handler: Not yet determined Error Code: 0x80070001 Config Error: Cannot read configuration file Config File: \?\UNC\VBOXSVR\code\web.config I've verified that the user account the app pool is running under can access the Share. Any ideas on how to fix this?

Original source

Related problems