title: Sitecore 8 : ControllerCreationException
body: <p>I'm using sitecore 8.1 which apparently supports Areas as well. To get POC going, I downloaded sitecore81areas project from below:</p>
  
  <p><a href="https://github.com/LonghornTaco/Sc81Areas" rel="nofollow">https://github.com/LonghornTaco/Sc81Areas</a></p>
  
  <p>And added a simple hello world controller.</p>
  
  <p>However, I'm getting the error below when trying to access the sitecore item:</p>
  
  <pre><code>[ExceptionWrapper: The controller for path '/' was not found or does not implement IController.]
  [ControllerCreationException: Could not create controller: 'Sc81Areas.Web.Areas.Site1.Controllers.Hello'. 
  The context item is: '/sitecore/content/Site1'. 
  The current route url is: '{*pathInfo}'. This is the default Sitecore route which is set up in the 'InitializeRoutes' processor of the 'initialize' pipeline. ]
     Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName) +202
     Sitecore.Mvc.Controllers.ControllerRunner.GetController() +23
     Sitecore.Mvc.Controllers.ControllerRunner.Execute() +43
     Sitecore.Mvc.Presentation.ControllerRenderer.Render(TextWriter writer) +134
     Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +30
     Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +75
     (Object , Object[] ) +74
     Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
     Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
     Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args) +216
     (Object , Object[] ) +74
     Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
     Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
     Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName) +259
     ASP._Page_Areas_Site1_Views_Shared_Site1DefaultLayout_cshtml.Execute() in c:\sitecore\sitecore81\Website\Areas\Site1\Views\Shared\Site1DefaultLayout.cshtml:19
     System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253
     System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
     System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
     System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +137
     Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +221
  [InvalidOperationException: Error while rendering view: '/Areas/Site1/Views/Shared/Site1DefaultLayout.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
  </code></pre>
  
  <p>I disabled the default route configurations:</p>
  
  <pre><code>//routes.MapRoute(
              //    name: "Default",
              //    url: "{controller}/{action}/{id}",
              //    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
              //);
  </code></pre>
  
  <p>Also </p>
  
  <ol>
  <li>added Area on Layout.</li>
  <li>Removed the default routes under Areas Registeration.</li>
  <li>Added mvcarea on site nodes</li>
  </ol>
  
  <hr>
  
  <p>Still the error persists.  I'm bit confused what exactly what could be the root cause (may be configuration setting or DI).</p>
  
  <p><strong>Not sure if my controller needs to inherit from specific sitecore controller.</strong></p>
  
  <p>Your help will be much appreciated.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I wanted to share my code but it's quiet big. Basically I downloaded the SC81Areas project from repo below and added the hello controller:</p>
  
  <p><a href="https://github.com/LonghornTaco/Sc81Areas" rel="nofollow">https://github.com/LonghornTaco/Sc81Areas</a></p>