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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Portal Creation Through Code / Maximum Number of PortalsPortal Creation Through Code / Maximum Number of Portals
Previous
 
Next
New Post
1/16/2007 11:31 AM
 
I am trying to create a few thousand parent portals through code and I am running into great difficulty after about 100 portals are created.  I am testing the concept of providing a portal to each of several thousand people.  The portal will consist of the default DotNetNuke portal template pages with one additional page containing a module I created.  This module is data driven and displays data based on the host name in the URL.

I have only been able to find one way to create portals in VB.Net code.  I have created a "creatportal" module that calls the PortalController CreatePortal method.  I have also created a VB.Net Console application that loops about 5000 times opening the DNN web page that contains the createportal module, passing in a unique portal name.

At first, portals take 15-20 seconds to create.  After the first hundred or so, this number is well over a minute per portal.  I let the console application run for about 16 hours and it managed to create about 650 portals.  However, about 20 percent of these portals did not have any portal alias.  Also, the web page timed out for many of the portals that should have been created.

I would much rather create a stand-alone application that references the DotNetNuke DLLs.  Second to this, I would consider creating the database records, folders, and files directly in code.  If you have any suggestions on how to reliably create portals through code and create 1000's of them, please let me know!  Also, I am open to suggestion on how to tweak caching and any other settings that may be affecting the creation of portals.

One additional note is that the problem is not limited to my code.  Now that I have over 650 parent portals, I can't even create a portal through the website Host/Portals page.  I waited 5 minutes for a single portal to be created before giving up.  The server I am running on is Windows Server 2003 with a 3GHz processor and 1GB of RAM.
Thanks,
-Pat
prichards@os-cubed.com
 
New Post
1/17/2007 2:41 PM
 
If anyone has experience with automated portal creation, I would greatly appreaciate any comments you have on how fast or slow this process is.  I am willing to pay a consultant for assistance with this issue if anyone is interested.

Thanks,
-Pat
 
New Post
1/19/2007 12:41 AM
 

Hi there,

Could you send me your console app and ill give it a whirl here and see if i can shed some light on the subject for you.

send it to thor_nexxus AT hotmail DOT com


Philip Beadle - Employee
 
New Post
1/23/2007 9:31 AM
 
Philip - I just emailed you the code.  Please let me know what you figure out.

For the benefit of all, here are code snippets from the Module and console app I am using:

---

Module
Dim objPortalController As PortalController
Dim intPortalId As Integer
Dim strPortalName As String
Dim strFirstName As String
Dim strLastName As String
Dim strUsername As String
Dim strPassword As String
Dim strEmail As String
Dim strDescription As String
Dim strKeywords As String
Dim strTemplatePath As String
Dim strTemplateFile As String
Dim strHomeDirectory As String
Dim strPortalAlias As String
Dim strServerPath As String
Dim strChildPath As String
Dim bolIsChildPortal As Boolean

objPortalController = New PortalController
strFirstName = "Portal"
strLastName = "Creator"
strUsername = "portalcreator"
strPassword = "dnnportal"
strEmail = "test@somewhere.com"
strDescription = "Portal"
strKeywords = ""
strTemplatePath = strPortalRoot & "\_default\"
strTemplateFile = "DNN.template"
strHomeDirectory = ""
strServerPath = GetAbsoluteServerPath(Request)
strChildPath = ""
bolIsChildPortal = False
strPortalName = Request.QueryString("portalname") & "test.local"
strPortalAlias = strPortalName
intPortalId = objPortalController.CreatePortal(strPortalName, strFirstName, strLastName, _
  strUsername, strPassword, strEmail, strDescription, strKeywords, strTemplatePath, _
  strTemplateFile, strHomeDirectory, strPortalAlias, strServerPath, strChildPath, bolIsChildPortal)
objPortalController = Nothing

Console Application
Dim intPortal As Int16
Dim strPortalName As String
Dim strURL As String
Dim objWebRequest As WebRequest
Dim objWebResponse As WebResponse

For intPortal = 1 To 10
    strPortalName = "Portal" & intPortal
    strURL = "http://www.test.local/Default.aspx?tabid=3477&action=createportal&portalname=" & strPortalName
    objWebRequest = HttpWebRequest.Create(strURL)
    objWebRequest.Timeout = 1000 * 60 * 2
    objWebResponse = objWebRequest.GetResponse()
    objWebResponse.Close()
Next

---

The console application loads the web page, passing in the portal name.  I would much rather have all of this code in a stand-along console application.  However, I can't figure out how to create a portal outside of a module.

Any suggestions are greatly appreciated!

Thanks,
-Pat
 
New Post
1/23/2007 12:24 PM
 
What version of DNN are you using?   That was an issue but I believe it was marked fixed in the recent releases...
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Portal Creation Through Code / Maximum Number of PortalsPortal Creation Through Code / Maximum Number of Portals


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