Subdomain dilemma

Discussion in 'ASP.NET 2.0' started by LanceUSA, Oct 5, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am aware that subdomains need to be redirected from the root, but I found an issue with this. The subdirectory application reads the root directories bin folder instead of its own.

    I get this error after migrating my application to the subdirectory and calling sub.domain.com:

    Could not load the assembly 'App_Web_ztcas2uj'. Make sure that it is compiled before accessing the page.

    When I take the subdirectory application's dll and move it to the bin folder on the root...it solves the problem.
    To me, this creates a maintenance nightmare. I would rather the subdomain use its own bin folder. Why is it using the roots bin folder? Is it because of the redirect?

    By the way, I'm using a HttpModule for the redirect, code found here: http://codebetter.com/blogs/brendan.tompkins/archive/2006/06/27/146875.aspx

    On another topic. If I call my subdomain application like this: www.domain.com/subdomain/ it seems to work without the above error, but now I get conflicts with inheriting the roots web.config.

    So this is what I've found:
    If I call the subdomain like so: sub.domain.com, it uses its own webconfig (not inheriting from the root), but requires dlls to be in root bin folder
    If I call the subdomain like so: www.domain.com/sub/ it uses its own webconfig (inheriting the roots webconfig), and pulls from its own bin folder

    This is completely unexpected. I can deal with web.config inheritance, but I would like my subdomain app to use its own bin directory.

    The goal is total isolation from the root by calling sub.domain.com (using own web.config and bin folder)...is this a pipe dream?

    Can someone shed some light on the matter to clear my conscience.
    Thanks.

    Post Edited (LanceUSA) : 10/5/2007 3:18:03 PM GMT
     
  2. Have you configured your sub-folder (sub application) as a web application (using the Web Application Tool in the Control Panel)?

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Yes...I've used the web tool to set them up as applications... The only way I can get this to work is to put the dlls in the bin folder of the root. I find this a real nighmare because the names are totally mangled...when I update a subdomain I need to delete the previous dlls before updating with the new ones.

    I really need to resolve this...I've taken hours and hours in research but all I find is set up ASP.NET 2.0 or activate subdomain as application...and I've done all that...I'm at my wits end on this one.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page