IIS - multiple virtual directories pointing to a single physical folder, hosting ASP.NET web service

6,867

It should be fine, the only thing to be careful is now that IIS 7 and above can use web.config files inside the content to store their settings (like directory browsing, and others) you could run into the problem that modifying a value for one will have the side-effect to change the other as well since both of them share the same web.config. One way to achieve that without affecting the other is to use paths inside ApplicationHost.config or the root web.config depending on if you are modifying settings of ASP.NET/WCF or IIS. But other than that you shouldn't have any problems.

Share:
6,867

Related videos on Youtube

Bigtoe
Author by

Bigtoe

Updated on September 17, 2022

Comments

  • Bigtoe
    Bigtoe over 1 year

    We have situations where we have multiple virtual directories pointing to the same physical folder, and I am wondering if this could cause any issues or if it is a supported configuration in IIS.

    For example, we install our software to folder c:\software\mywebservice

    We setup a virtual directory for anonymous access pointing to this physical folder.

    We setup a 2nd virtual directory for Integrated Security access pointing to the same physical folder.

    Is this type of configuration OK, or are there any potential side effects that anyone knows about?

    Kind Regards

    Noel

  • Jon Angliss
    Jon Angliss almost 14 years
    I use a similar setup, and have several virtual directories pointing to the same physical directory. I have no issues with it, but as Carlos points out, changes to the settings for that virtual directory under one site/directory will most likely be written out to the web.config in that physical dir, and applied to all of them.