im trying out the contentservice in order to copy content from one site to another.
however im hitting an issue with just the barebones setup to retriece data.
added the Umbraco.core.dll, added the references to Umbraco.Core, Umbraco.Core.Models and Umbraco.Services and my page has nothing more complex than...
int rootID = 1252; var cs = ApplicationContext.Current.Services.ContentService.GetChildren(rootID);
However on running the page doesnt load, and on running debug i get the error:
Object reference not set to an instance of an object.
ContentService v6
im trying out the contentservice in order to copy content from one site to another.
however im hitting an issue with just the barebones setup to retriece data.
added the Umbraco.core.dll, added the references to Umbraco.Core, Umbraco.Core.Models and Umbraco.Services and my page has nothing more complex than...
However on running the page doesnt load, and on running debug i get the error:
Object reference not set to an instance of an object.
Mark,
Is this code in website project or console application? I would take a look at https://github.com/sitereactor/umbraco-console-example on how to use the api to create contnet.
Regards
Ismail
is working on a reply...