DLL confusion with multiple sites on a single host

I

i_have_control

I'd be grateful for any input on this one:

I have three web domains. The destinations of two are set to folders
on the first, though that fact is transparent to the user (i.e: it does
not REDIRECT to the first domain). Example:

http://www.maindomain.com (main hosted package)
http://www.subdomain1.com -> www.maindomain.com/subdomain1/
http://www.subdomain2.com -> www.maindomain.com/subdomain2/

To be precise, the two domains' destination is actually
c:\iisroot\maindomain.com\subdomain1 or 2.

If I stick a different HTML or Classic ASP page (default.asp, say) in
each of the root of those three sites, they each appear differently.
Fine. But when I do it with ASPX applications it gets weird.

If I have three different 'default.aspx' files in the root of those
sites, with or without a different class / Inherits tag (e.g.:
Inherits="subdomain2._default2"), the page will return the correct
default.aspx first time AND THEN ALWAYS RETURN THAT SAME PAGE WHEN
DEFAULT.ASPX IS CALLED FROM ANY OF THE OTHER DOMAINS. So if you first
visit subdomain1.com/default.aspx that will be correct, but if you THEN
visit subdomain2.com/default.aspx you will get the page from
subdomain1.com. If, however, you visit
maindomain.com/subdomain2/default.aspx you will get the correct page
for subdomain2. Frustrating.

Now, I figured that all the DLLs are being called from the /bin/
folder in the root of maindomain.com because only they affect if the
site is working. I can't really put them in the root of the subdomains
because it isn't ACTUALLY a root folder, so they won't be called from
there. I also know that when a page is called for the first time it is
compiled by the server (nothing to do with VS.NET). This, I think, is
where the confusion happens.

I figure the server is getting confused by the fact that the DLL is
in the root /bin/ folder (of maindomain.com) but the web form called by
the browser is in the 'root' of subdomain1 or 2. It therefore sees
requests for all three domain as being for the same /default.aspx file
and returns that which it has already compiled. Remember this doesn't
happen with HTML files.

Incidentally, it doesn't seem to matter if the classes are in their
own namespace or not.

Any ideas on how to combat this confusion? It's infuriating!
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top