ASP.NET VirtualDirectory app and website’s /bin

asp.netiis

After quite a bit of searching I think my situation is different enough I have to actually ask a question!

I have a website for public consumption and a maintenance site for the data in a virtual root beneath the website. I would like for them to both use the same /bin folder but I can't get that to work. The virtual root has different (more restrictive) IP access controls. IIS sees this:

www.abc.com ->      C:\Website
    /Maintenance -> C:\Maintenance

www.abc.com has a C:\Website\bin and C:\website\web.config.

I would like /Maintennace to also use C:\Website\bin. They seem to 'cascade' web.configs – C:\Website\web.config defines some things and refers to assemblies in its bin folder. When /Maintenance fires up I get errors about not being able to resolve assemblies referenced in C:\Website\web.config. C:\Maintenance\web.config also gets processed.

IIS6, ASP.NET 3.5, Win2k3

Is this doable?

Best Answer

You can un-register DLL files from C:\Maintenance\web.config. I used to do so when I created a sun virtral directory under a DotNetNuke root website. For Example, if you are referencing a HTTP Module in your C:\website\web.config:

<httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>

You can remove the reference from C:\Maintenance\web.config:

<httpModules>
      <remove name="ScriptModule"/>
</httpModules>
Related Topic