locked
New Domain is not accessing the Classes of outter domain RRS feed

  • Question

  • User-2121587974 posted

    I have a domain, call it MainDomain.net, I have five other domains Domain1.net, Domain2.net...

    I created a razor site for MainDomain.net, all class files are in the App_Code directory and they all work fine fine from this domain.

    I created directorys Domain1, Domain2.... set a forward for the domains to these directroys for each of the Domain#.nets at my hosting company.  I copied files into each directory, these files use Class files from the MasterDomain.  This works fine from a browser, no errors when using my custom classes.

    Today, I created a new directory for a subdomain, call it sub.domain1.net, set the forward for the sub.domain.  Creating a subdomain or a domain are the same process.
    Copied files to the subdomain.

    When I access the sub.domain1.net from a browser it finds fine.  Opens cshtml files and stuff.

    When I try to use a class from MasterDomain in the sub.domain1.net site, the browser it states it can not find that class or namespace.

    Why do the other directorys such as domain1,2,3... do not have this problem but this new one does?

    Is there something I can change to have it look elsewhere for the classes.  I do not want to have to copy a whole new set of classes to this directory for it to work.

    Here is another point that is weird.  The only place where there is a bin folder for all of these directorys or domains/subdomains is in the MasterDomain site.  So that means that in sub.domain1.net it uses these bin files to open the cshtml files, but it cant find the classes.

    Any help at this point would be great.

    Thanks.

    ____________
    edit
    ____________

    After posting I remember reading this the other day.  I think it fits into this but I would like to know how to control the permissions of the Master soultion to the Projects.

    http://msdn.microsoft.com/en-us/library/ee817674.aspx

    Still, I have not found a soultion.  I have pasted the App_Code directory into the sub.domain1.net site (again, no bin folder) and the site runs fine.  So it pulls the bin from the Master but not the classes.

    Thanks again.

    ____________
    edit  6/14/13 2:35aest
    ____________

    Here is an update.  I built a .dll that has a name space, class, method that spits out Hello World.  I added to the MaterDomains bin directory.  I called in in one of the domains, it works fine.

    I then tried it in the subdomain, didnt work, cant find the namespace.  I rebuilt and built the subdomain.  Still doesnt work.

    This means that the subdomain is pulling from a bin somewhere else to make the cshtml files work. 

    This is baffelling me.

    Thursday, June 13, 2013 3:44 AM

Answers

  • User-166373564 posted

    Hi bzdarko

    Why do the other directorys such as domain1,2,3... do not have this problem but this new one does?

    Is there something I can change to have it look elsewhere for the classes.  I do not want to have to copy a whole new set of classes to this directory for it to work.

    For this issue, I don’t think it is a good way to copy classes to MainDomain.net, Domain1.net, Domain2.net...,  I would like to suggest you to create class library for your classes, then these domains give a reference to this class library, you can have a try, and check whether it can fix this,

    Regards

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 20, 2013 1:39 AM