1

We are fetching data from List Manager list. However, It is working fine for CM but the below code is throwing an error on CD server.

var contactListProvider = ServiceLocator.ServiceProvider.GetService<IContactListProvider>();
var contactProvider = ServiceLocator.ServiceProvider.GetService<IContactProvider>(); 
var contactList = contactListProvider.Get(Guid.Parse(listId), new CultureInfo("en"));

When we try to run above code then contactListProvider value is null on CD.

1

List Management services DI is configured for Content Management or Standalone Roles. Please check configuration: \App_Config\Sitecore\ListManagement\*.config. To enable the services for CD you need to patch Sitecore.ListManagement.Services.config config file for your CD role.

2
  • After adding patch file, getting this error "Could not find configuration node: databases/database[@id='master']" and I have added ContentDelivery role – User7864 May 21 at 9:23
  • That may be because in Sitecore.ListManagement.config the "ListManagement.Database is set to master and you do not have that on CD. Please review all ListManagement configs and make CD adjustments. – Alina Fodor May 21 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.