Last post Aug 28, 2010 01:15 PM by DigiMortal
Aug 25, 2010 05:40 PM|lakersfan74|LINK
I m sure this question has been asked before. I have a web application hosted under
http://localhost/abc. which is mapped to c:\inetput\wwwroot\abc folder. I have APP_Code, App_LocalResources, BIN and other folders under abc folder. Everything is great. Now I want to create another application or sub application
http://localhost/def. Both abc and def apps need to use some common classes and resources. Whats the best way to do it. I dont need to create a separate application for def. All i want is the url
Aug 25, 2010 09:02 PM|marcinsw|LINK
there is no such thing as sub aplication. If you want to share classes within two websites you have two choices:
1. Run each website as separate application that uses the same dll (class library project) holding shared classes.
2. Run both sites under one application.
In first case it is an easy task. You have to create third project, put all shared classes there and reference it to both your web application projects. Then publish each app into separate folder on your server and you are done.
Second case is even simpler. You have to ask yourself a question do I really need two apps? If you don't need, just put some of your web forms pages into folder abc and some into def.
Hope it helps...
Aug 28, 2010 07:54 AM|atconway|LINK
Both abc and def apps need to use some common classes and resources. Whats the best way to do it. I dont need to create a separate application for def.
If you truely have 2 distinct websites and need to share common logic between them, you might consider porting the common logic to a WCF service. Both sites can consume the service to use the logic. The WCF service can be centrally updated as well which
eliviates needing to redeploy the same .dll to multiple projects across domains if you were to use a common binary.
Aug 28, 2010 01:15 PM|DigiMortal|LINK
If different address is all you need and functionality accessible through different address is basically a part of your app then I think you have two options:
If your application under def is totally different and has no common points in logic with application under abc then you should make two different web applications and use web services like arconway suggested.