我在使用Sitefinity的网站上有以下代码
我需要封装该功能,并将其作为webservice的方法公开
model.listaDirecciones = new List<SimpleTO>();
var calles = App.WorkWith().ListItems().Where(o => o.Parent.UrlName == "listado-direcciones-formularios-venta"
&& o.Status == ContentLifecycleStatus.Live).Get().OrderBy(o => o.Ordinal);
foreach (var calle in calles)
{
var item = new SimpleTO();
item.id = calle.Title.ToUpper();
item.nombre = Utilities.Html.StringMethodExtensions.HTMLtoTEXT(calle.Content).ToUpper();
model.listaDirecciones.Add(item);
}
所以我创建了一个WCF Webservice项目并添加了对以下程序集的引用
调用App.WorkWith
行时,我收到以下异常
{"The configuration 'ListsConfig' is not registered"}
使用此stacktrace:
" en Telerik.Sitefinity.Configuration.Config.VerifySectionRegistered(Type sectionType, String sectionName)\r\n en Telerik.Sitefinity.Configuration.Config.GetSectionInternal(Type sectionType, Boolean safeMode, String sectionName)\r\n en Telerik.Sitefinity.Configuration.Config.GetSectionPrivate(Type sectionType, Boolean safeMode, String sectionName)\r\n en Telerik.Sitefinity.Configuration.Config.GetSectionPrivate[TSection](Boolean safeMode)\r\n en Telerik.Sitefinity.Modules.Lists.ListsManager.get_ProvidersSettings()\r\n en Telerik.Sitefinity.Data.ManagerBase`1.GetProvidersSettings()\r\n en Telerik.Sitefinity.Data.ManagerBase`1.Initialize()\r\n en Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName)\r\n en Telerik.Sitefinity.Modules.Lists.ListsManager..ctor()"
我该如何解决这个问题?