Virtual directory woes…..

We
make custom websites for people, just random stuff, shopping carts, photo
galleries, things of that nature.  We have an administration web site that
we attach to each website so that users can manage their own websites without
having to call us for each change or update.  The way the administration
website works is that it gets mapped into the customers website as a virtual
directory, so they just browse to a special directory on their own
site.

So, consider this setup:

  1. The client site is located at
    C:\Inetpub\wwwroot\clientSite\
  2. The admin site is located at
    C:\Inetpub\wwwroot\Internal\AdminWebSite\

We map path #2 into path #1, thus making the
virtual URL:

C:\Inetpub\wwwroot\clientSite\myWebAdmin\

This is great because now all of our clients
can share the same admin web site files, because we can just map the site into
theirs. Except for one thing: you cannot access assemblies in a virtual
directory. In order for the runtime to locate the admin web site assemblies, to
run the site, the assemblies have to physically be in the client site. 
I’ve tried to circumvent this by adding a <runtime> element to the
web.config file, so that I could probe for the assembly in the virtual
directory, but without luck.  What this means is that while we can map the admin site into our client’s
sites, we still have to copy the 4 assemblies into the client’s bin\
directory.

Now, this isn’t the end of the world, all the
clients still share all of the pages, the .aspx, .js, etc. but its just a little
annoying to have to copy the assemblies into each clients site every time we
make a change to them.  I would rather just update one set of assemblies
and know that all the sites got updated.

4 Comments so far »

  1. Anonymous said,

    Wrote on February 12, 2005 @ 2:09 pm

    You can make that virtual directory an IIS application (if you’re not relying on session being shared between the client app and the admin app) and then it will use the assemblies in the admin’s bin.

  2. Anonymous said,

    Wrote on February 12, 2005 @ 2:16 pm

    We are sharing web.config files, but thats certainly a limitation that we can work around, I’ll give that a shot, thanks Paul!

  3. Anonymous said,

    Wrote on February 14, 2005 @ 2:04 am

    What about using the the GAC? or am I missing the point?

  4. Anonymous said,

    Wrote on February 14, 2005 @ 5:08 am

    I didnt want to use the GAC, because I dont think the intent of the GAC was to store entire web applications, but rather for commom class libraries you want to share, it would certainly work, and its something we have considered.

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Enter my name (ben) in this box, so I know you're a human.

Comment: