I'm creating a custom module that needs to create child portals, but for life of me I cannot figure out why the call to DNN to create a child portal fails during a call to GetPortalSettings located inside the CreatePortal procedure. But, creating a child portal from within the Host Site Management tab poses no problems and works every time. I have copied the same logic from the dnn admin Signup.ascx control.
I'm logged in as the host user!
I have tried stepping thru the creating of a child site using the host site manage tab, and at the call to CreatePortal copy the same value and pasting the same parameter values into the code below (obviously making sure the site does not already exist), the call still crashes at GetPortalSettings.
PortalController portalController = new PortalController();
UserInfo adminUser = UserInfo;
adminUser.Membership.Password = UserController.GetPassword(ref adminUser, String.Empty);
int intPortalId = portalController.CreatePortal(
"demoportal"
, adminUser
, "demoportal"
, ""
, @"C:\Websites\Test\Portals\_default"
, "Blank Website.template"
, ""
, @"localhost/demoportal"
, @"C:\Websites\Test\Portals\"
, @"C:\Websites\Test\demoportal"
, true);
Does anyone know where or from whom I could get some help to try resolve this issue?
Any Ideas are welcome at this stage!
Apologies it this is not the correct place to post, but I don't know where else to get help!