No component for supporting the service CMS.Helpers.ICurrentCookieLevelProvider was found

asked on April 30, 2020 13:06

I am having kentico 11 website. When am trying to host and run it locally am getting following error

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

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.3928.0

Recent Answers


Trevor Fayas answered on April 30, 2020 17:25

It seems like you're missing some library files in the bin folder, or have an outdated one. The ICurrentCookieLevelProvider is implemented by the CMS.Helper.dll 's CMS.Helpers.CurrentCookieLevelProvider, so make sure your CMS.Helper.dll is the right version. You can right click on the CMS.Helper.dll file and go to properties, and under details it will show it's version number, make sure it is 11

If it shows 11, here's some other questions you can answer to help us figure this out for you:

  1. When you set this up locally, did you copy from somewhere else?
  2. Is this a WebApp or a Website? Do you build it and run it locally or just hit the site without building?
  3. Is this set up as a virtual directory to your default site, or is it it's own IIS site?
  4. How many files do you find in the bin folder, you should have about 416 files and 10 folders
1 votesVote for this answer Mark as a Correct answer

Sultan Ahmed answered on May 1, 2020 10:24 (last edited on May 1, 2020 10:30)

Yes CMS.Helper.dll version is 11.

Please find answers to your questions

  1. I have cloned it from one of the repository. It was pushed into the repository by some other person.
  2. It is website. I have tried to build it locally there are some errors, here is the screenshot of it. https://pasteboard.co/J6km1A15.png
  3. Own IIS
  4. There are 114 dll files, 139 refresh files, 124 xml so cumulative 402 files and one folder i.e. roslyn which has total 88 files.
0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on May 1, 2020 21:35

My guess is the repository has some ignore file that is excluding Something that's needed.

Can you try installing a fresh Kentico 11 instance and comparing the folders to see what may be missing?

0 votesVote for this answer Mark as a Correct answer

Sultan Ahmed answered on May 3, 2020 17:34

I also think that there might be some files missing, would go ahead and check it. One question that is still running is why is that when it is run directly on browser from visual studio it runs successfully, where as when we try to run from local IIS then this issue is occurring which is wired. Any idea What would be causing this issue?

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on May 4, 2020 07:22

Not without looking at it, best I can do is try to do a screen share and take a look, often quicker than going back and forth. I'm off this week but you can shoot me an email, tfayas@gmail.com and I'll try to find a time to look it over with you.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.