I am creating a new website/area using the Area.Copy method. This is my code:
Dynamicweb.Content.Area Ase = Dynamicweb.Content.Area.GetAreaById(areaId); Dynamicweb.Content.Area A = Ase.Copy(Dynamicweb.Content.Area.CopyMode.StructureAndContent, false, true, true, true, false); A.Name = cleanName; A.Domain = cleanName; A.DomainLock = cleanName; A.Description = User.ID.ToString(); A.Active = true; A.LayoutTemplate = "Designs/site/dealer_show.cshtml"; A.Culture = "da-DK"; A.Save();
This works fine. The website is created, attached a template, set to active vice versa. The problem is that the website is not available through the domain until
a) I upload a new DLL, meaning the pool refreshes
b) I manually log onto the backend, opens the website in the website module and clicks "save" ( Without changing any properties )
Heres a video explaining the problem : http://screencast.com/t/nGu6gSKAcmQm
Thanks in advance.
Jonas