IIS7: Virtual Directory Shares Site's Physical Path

0

I would like to set the physical path of a site's virtual directory in IIS7 to be the same as the parent site. When I do this, I get the error

Cannot create a file when that file already exists. 
(Exception from HRESULT: 0x800700B7)

when trying to edit the web.config file for the virtual directory, which I assume is occurring because the web.config file is the same as the parent's (which is desired). How can I fix this?

iis-7
directory
virtual
parent
asked on Stack Overflow Dec 11, 2013 by Kjata30 • edited Apr 5, 2015 by jdphenix

1 Answer

0

Took some time, but came to the right answer.

The issue was due to only certain sections of the web.config that could not be shared between the parent and children sites. Adding

<location path="." inheritInChildApplications="false">

around the problem blocks resolved the issue.

answered on Stack Overflow Dec 23, 2013 by Kjata30 • edited Jun 12, 2014 by Kjata30

User contributions licensed under CC BY-SA 3.0