Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple applications with one DB and Code baseMultiple applications with one DB and Code base
Previous
 
Next
New Post
11/9/2006 3:23 PM
 
Hello Folks,

I am learning Asp.net and am fairly new to .Net. I looked around the code for DNN 2.x a while ago and saw that the portal was designed to serve multiple domains or urls. The code in the new version did not seem to clear on how this is accomplished. I am working on a personal project where for maintainability I would like to use one set of code and DB to serve more than one domains.

I understood from the earlier versions and Rainbow portal how to pass the Portal Settings derieved from the DB on each request using Begin_Request in Global.asax. How is this done in DNN 4.x?

Also I ran into an issue with the .Net 2.0 Membership system and my portal application. In order to use the membership system to differentiate the Users of each domain, I will have to have an entry of the associated Application in the Membership DB and each User will have the ApplicationId in the Users table. This part the Membership system does automatically, inserts the Application name and Id. But since more than one domain is involved and obviously I can not hard code the application name in the web.config, how do I let the Membership system, Create user wizard know which application the user is for?

I would appreciate any feedback, comments and sample code if anyone has dealt with similar issues.
Thanks
Ho
 
New Post
11/10/2006 6:21 AM
 

All of this is built directly into the portal framework so no code examples are needed.

The concept of using multiple domains in DNN is called a Parent Portal.  When you go into Host --> Portals and create a new portal, you are asked if the portal will be a Parent or Child.  If you select Parent, you are expected to enter a full domain.  Prior to doing this, you will want to have that domain setup as a website in IIS and set its root directory to your DNN codebase.  That's it.

Membership is handled automatically.  DNN generates the applicationid using the standard aspnet_applications table.  By default, users are unique to portal so when a new user is created, the references to the appropriate portalid and applicationid are automatically synced.

 

 
New Post
11/10/2006 1:48 PM
 
Hi professorcw1,

Thanks for your response, you have made some things clear for me and a better understanding of DNN.

professorcw1 wrote

All of this is built directly into the portal framework so no code examples are needed.


I am not quite sure what you meant by the statement above. If the mechanism of multiple portals and membership system is built in to DNN framework, how can I look at the code and see how it is done so I can incorporate it into my application?

I appreciate your help, thanks.
 
New Post
11/13/2006 10:34 AM
 
I guess I misunderstood your question.  When you talked about incorporating it into your application, I took that to mean multiple child and parent portals.  Are you trying to use DNN components outside the DNN framework?  That would be a totally different topic.  Give us a little more details on what you're trying to do and we'll start again.  One question... Are you or are you not building DNN based websites?
 
New Post
11/14/2006 1:35 PM
 
professorcw1 wrote
One question... Are you or are you not building DNN based websites?

Hi professorcw1,

Thanks for your response. I am not building DNN based web sites but rather building or designing an application that can serve multiple domains (url's). Perhaps the right term would be a portal. Lets say I have several sites setup in IIS all point to one folder. This folder contains my C# ASP.Net application. I want to able to use one database with a table holding the settings for each host or site.

From what I have read so far I have to get the site settings from the database on each request. This can be done in the Global.asax file on Begin_Request method. Is this how DNN 4.x does it? I wanted to look at the code on how this functionality is handled.

Hope I have made my point a little clearer.
Thanks for you help.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple applications with one DB and Code baseMultiple applications with one DB and Code base


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out