Binding website to application subdirectory

M

markric

Good day,

I have an ASP.NET application / website with the following type of
structure:

+ wwwroot
+ company site
+ masterpages
+ product1
+ product2

The root of the ASP.NET application is "company site", and it has it's
own IIS website and domain name (www.mycompany.com). It also contains
the application's sole web.config file.

Next, I create a new IIS website for "product1" with its own domain
name "www.product1.com". At this point, I want to point this product
website to the *existing* product1 directory structure above, which I
do via the "home directory" tab of IIS configuration (I don't wish to
use redirection in this case, so I just point it to the literal file
system path).

Such a configuration results in ASP.NET errors when accessing
"www.product1.com". The application is no longer able to resolve, for
example, the location of master pages in the parent "masterpages"
folder (which are shared amongst products and accessed from code as
"~/masterpages/primary.master"). I tried converting the "product1"
folder into an application (within IIS), but it had no impact.

How can I make such a structure work without using http redirection?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top