none
multiple webapp in the same domain RRS feed

  • Pergunta

  • Hi, 

     

    I have a domain and I'd like to put some independent webapp running inside it. But I can't figure out how to make it work properly.

    Let me give a sample what I'm trying to do:  

    \mydomain [dir]         --> That is the root of www.mydomain.com

        \bin  [dir]         --> has the dlls of the main site 

        \default.aspx       --> some aspx page on the main site 

        \web.config         --> the config of the main site

        \app1 [dir]         --> the location of the other webapp

            \bin [dir]      --> the dlls of the app1 site 

            \default.aspx   --> a page for the app1 site

            \web.config     --> the config file for the app1 site. 

    Well "app1" should behave independently from the root site through the URL www.mydomain.com/app1 or app1.mydomain.com (either one is fine for me, but I really prefer the second one). 

    I have two separate projects in VS2008 that generate the sites and publish then in the proper folder. When debuging or running local (via localhost:[port number]) they work fine, but of course they use distinct ports. 

    The problem is that App1 does not recognizes the dlls in its "bin" folder. It only works if I put the dll in the root "bin" folder (same goes for themes if I create some App_Theme folder, ie. It only recognizes themes on the root folder). That's not good. 

    I'm publishing it in a ISP so I don't have access to it's IIS configuration to create applications.

    I'm almost sure that is something missing in one of the web.config's (or both) to make the apps works independently.

    Can someone help me? Please send some step-by-step answer because I'm new on the matter.

    Thanks 

    quarta-feira, 18 de novembro de 2009 04:16

Todas as Respostas

  • As you've said the ASP.NET Development Server creates one instance for any web.config you got on your project.

    To solve this in production you must create distincts virtual directories for any application.

    HOWTO:
    http://support.microsoft.com/kb/172138

    Roberto Santos http://blog.robertoosantos.com
    quarta-feira, 18 de novembro de 2009 10:21