I am trying to make an Umbraco package. for that package I need all the ids, nodenames, cultures and domainnames of the root contents.
I tried the following
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var allContents = umbracoHelper.TypedContentAtRoot();
This however gives me the following exeption in the logs:
System.ArgumentNullException: Value cannot be null.
Parameter name: httpContext
at System.Web.HttpContextWrapper..ctor(HttpContext httpContext)
at h5ysr_package.DataCollectorSender.GetlinkedDomains()
at h5ysr_package.DataCollectorSender. <StartCollection>d__2.MoveNext()
Get the all the id of root contents
Hello Our Umbraco community!
I am trying to make an Umbraco package. for that package I need all the ids, nodenames, cultures and domainnames of the root contents.
I tried the following
This however gives me the following exeption in the logs:
How would I solve this problem?
Hi Hicham
Where did you place this code? Is it a controller or so?
Did you add needed namespaces?
Alex
is working on a reply...