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/14/2006 3:15 PM
 

If you download the DNN4 Source you could look at the code on how the functionality is handled.

 

 
New Post
11/14/2006 7:38 PM
 
spinecom wrote

If you download the DNN4 Source you could look at the code on how the functionality is handled.


Hello spinecom,

Thanks for your reply. I did look through the code and I could not locate anywhere the Portal or settings are retrieved. I could not understand what was going on in the Begin_Request method in Global.asax. I am assuning this is where it all happens.

        Private Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)

            'First check if we are upgrading/installing
            If Request.Url.LocalPath.EndsWith("Install.aspx") Then
                Exit Sub
            End If

            Try

                If Services.Scheduling.SchedulingProvider.SchedulerMode = Scheduling.SchedulerMode.REQUEST_METHOD _
                AndAlso Services.Scheduling.SchedulingProvider.ReadyForPoll Then

                    Dim scheduler As Scheduling.SchedulingProvider = Scheduling.SchedulingProvider.Instance
                    Dim RequestScheduleThread As Threading.Thread
                    RequestScheduleThread = New Threading.Thread(AddressOf scheduler.ExecuteTasks)
                    RequestScheduleThread.IsBackground = True
                    RequestScheduleThread.Start()

                    Services.Scheduling.SchedulingProvider.ScheduleLastPolled = Now

                End If

            Catch exc As Exception
                LogException(exc)
            End Try

        End Sub
 
New Post
11/14/2006 11:43 PM
 

So a couple of comments....

First, this really has nothing to do with the global.asax and the code you're looking at in Application_BeginRequest is what's used either on initial installation or when performing an upgrade.  This is done at the codebase level and would affect all of your portals.

Next, the logic to determine what portal you are viewing is a pretty low level function.  You'll have to really dig through a lot of code in the admin/portal and admin/tabs folders as well as default.aspx.vb.  The default file really starts everything.  You should also look at how the portals/[portalid]/default.aspx page does its settings and redirects to the root default page.  By examining the portals, portalalias, and tabs tables in the database, you can get an idea of how things are separated.

Lastly, your first post said you are relatively new to .net and a subsequent post said you are trying to build a portal application.  I guess my follow up question would be Why?  DNN does all of this and is an outstanding portal framework.  That's why we're all here.  It's one thing to want to understand what's going on; it's another to try and recreate the wheel.  If you do it all from scratch, once you get the multi-portals concept licked, you'll have to start in on stuff like How do skins work?, How do I build a membership provider?,  and What's the best way to implement your own client api?. This list goes on and on... 

I guess my point is unless you're goal is to develop an application framework to compete against DNN, why not just use DNN?  Every large business, consulting firm and seasoned developer uses some kind of framework as their basis for all projects (and no the .NET Framework doesn't count -- it's just too big to use as a starting point).  You don't want to have to do all the plumbing each time you start a project; you want to start with a framework that sits on top of .NET that you trust has handled all the grunt work so you can concentrate on your business logic.  This applies to Java as well.  Every Java developer I know uses a framework they trust as a starting point for most applications.

I may be misunderstanding what you're trying to do, but it sounds like you're trying to redevelop a lot of code and features unnessicarily...  especially if you're new to .net development.  If I were your supervisor or a paying client, I'd be pretty upset if you hit me with a bill for 100s (or 1000s) of hours developing your own framework when you could get a proven, stable one for free.

Don't take me wrong.  I'm not slamming you personally.  You obviously see that DNN has some cool features and recognize it's value.  If you didn't you wouldn't be here in the first place.  I just think you should consider using DNN as your framework and spend your precious coding hours on custom modules and your company's/customer's business needs.

 

 

 

 
New Post
11/20/2006 10:05 PM
 
hi professorcw1,

I need to setup a cms solution for a customer which allows them to create users that can be assigned permissions to manage content on different sites.

Judging by what you said with the portal framework, i can go in and setup an IIS site for each website and point its home dir to the dnn core folder. When i run the first site, the DB install will take place. I then need to go into host options and setup multiple website (parent portals) and set the domains inside DNN as well so it serves the correct content based on the url.

Thanks.

AG
 
New Post
11/21/2006 9:12 AM
 

Yep, that's pretty much the way it works.

I'm not sure about "set the domains inside DNN as well..." part.  When you create a parent portal, you specify the domain name.  That's really all you need to do.  The only additional thing you may need to do is add more portal aliases to a portal. 

Say you create a parent portal with www.bobsbaitandtackshop.com  You may also want to add a portal alias to bobsbaitandtackshop.com (without the www).  You might also have other domains registered like bobsfishingsupplies.com that is really the same site.  If so, you can just add that alias to dnn.

If you search the boards, you'll find thousands of implementations doing exactly what you described.

 

 
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