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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...HELP, Cannot Create Portal, ERRORHELP, Cannot Create Portal, ERROR
Previous
 
Next
New Post
2/1/2007 3:29 PM
 

I have been unable to programmatically create a portal.  I keep getting an error and I don't know what I am doing wrong.  FYI, I am working with DotNetNuke 3.3

The error is happening in Reflection.VB
"     ' get the typename of the default DataProvider from web.config
       TypeName = CType(objProviderConfiguration.Provider(objProviderConfiguration.DefaultProvider), Provider).Type
              
Here is the Error:
Error Generated trying to create Portal The type initializer for "DotNetNuke.Services.Cache.CachingProvider" threw an exception. at DotNetNuke.Services.Cache.CachingProvider.Instance() 

Here is my code (cpEComCBO is a CBO of portal information being passed to the function):
             Dim dnnPortalObj As New DotNetNuke.Entities.Portals.PortalController 

                'Create Portal
                With cpEComCBO

                    iPortalID = dnnPortalObj.CreatePortal(.PortalName, _
                                                          AdminParams.FirstName, _
                                                          AdminParams.LastName, _
                                                          AdminParams.Username, _
                                                          AdminParams.Password, _
                                                          AdminParams.Email, _
                                                          .PortalDescription, _
                                                          .PortalKeyWords, _
                                                          strTemplatePath, _
                                                          .PortalTemplate, _
                                                          "Portals/9", _
                                                          .PortalAlias, _
                                                          "", _
                                                          "", _
                                                          True)

                End With

 

Please Help, I am getting killed!!! 

Thank you ,
Preston

 

Here is the complete stack trace:

Error Generated trying to create Portal The type initializer for "DotNetNuke.Services.Cache.CachingProvider" threw an exception. at DotNetNuke.Services.Cache.CachingProvider.Instance()

at DotNetNuke.Common.Utilities.DataCache.GetCache(String CacheKey)

at DotNetNuke.Services.Localization.Localization.GetSupportedLocales()

at DotNetNuke.Services.Localization.Localization.GetResource(String ResourceFileRoot, PortalSettings objPortalSettings, String strLanguage)

at DotNetNuke.Services.Localization.Localization.GetString(String name, String ResourceFileRoot, PortalSettings objPortalSettings, String strLanguage)

at DotNetNuke.Services.Localization.Localization.GetString(String name)

at DotNetNuke.Entities.Portals.PortalController.CreatePortal(String PortalName, String FirstName, String LastName, String Username, String Password, String Email, String Description, String KeyWords, String TemplatePath, String TemplateFile, String HomeDirectory, String PortalAlias, String ServerPath, String ChildPath, Boolean IsChildPortal)

 
New Post
2/2/2007 10:48 AM
 

Hey, I just realized something.  The error keeps occuring when DotNetNuke attempts to load values from web.config.  Since the application is not running, it keeps returning nothing for the web.config values.  Is there a way for me to start the website, and then make the call to CreatePortal? If the website was running, the application would be able to retrieve the web.config values.

 

Any thoughts?

 

-Preston

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...HELP, Cannot Create Portal, ERRORHELP, Cannot Create Portal, ERROR


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