Компонент для поддержки сервиса CMS.Helpers.ICurrentCookieLevelProvider не найден - PullRequest
0 голосов
/ 30 апреля 2020

Привет, у меня есть сайт Kentico 11. Я получаю следующую ошибку при попытке запустить хост и запустить его локально из IIS

Server Error in '/' Application.
No component for supporting the service CMS.Helpers.ICurrentCookieLevelProvider was found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service CMS.Helpers.ICurrentCookieLevelProvider was found

Source Error:


Line 16:     protected override void OnPreRender(EventArgs e)
Line 17:     {
Line 18:         base.OnPreRender(e);
Line 19: 
Line 20:         lblText.Text = "The web site doesn't contain any content. Sign in to <a href=\"" + ResolveUrl("~/Admin/cmsadministration.aspx") + "\">administration</a> and edit the content.";

Source File: \CMS\Default.aspx.cs    Line: 18

Stack Trace:


[ComponentNotFoundException: No component for supporting the service CMS.Helpers.ICurrentCookieLevelProvider was found]
   Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext) +144
   Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments) +40
   Castle.Windsor.WindsorContainer.Resolve() +69
   CMS.Core.IoCContainer.Resolve() +93

[ServiceResolutionException: Resolution of 'CMS.Helpers.ICurrentCookieLevelProvider' failed with the following error: No component for supporting the service CMS.Helpers.ICurrentCookieLevelProvider was found]
   CMS.Core.IoCContainer.Resolve() +262
   CMS.Helpers.CookieHelper.IsCookieAllowedInternal(String name) +38
   CMS.Helpers.CookieHelper.GetValueInternal(String name, Boolean useDefaultValue, Boolean allowSensitiveData) +397
   CMS.DocumentEngine.DocumentContext.GetCurrentStylesheet(PageInfo pageInfo) +87
   CMS.UIControls.DocumentBase.get_CurrentStylesheet() +31
   CMS.UIControls.DocumentBase.SetCSS() +21
   CMS.UIControls.DocumentBase.PreRender() +44
   _Default.OnPreRender(EventArgs e) in \CMS\Default.aspx.cs:18
   System.Web.UI.Control.PreRenderRecursiveInternal() +132
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4005

Любая помощь будет очень ценной.

1 Ответ

0 голосов
/ 30 апреля 2020

Похоже, что некоторые библиотеки CMS могут отсутствовать. Как вы настроили сайт: вы установили Kentico или получили резервную копию кода и базы данных? Проверьте недостающие ссылки в проекте CMS в Visual Studio, очистите, перестройте и попробуйте снова.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...