asp.net-mvc-3 – 命名空间’Sitecore’中不存在“内核”
发布时间:2020-12-16 06:31:42 所属栏目:asp.Net 来源:网络整理
导读:遇到奇怪的Sitecore错误.使用MVC将Sitecore 6.6中的布局应用于几个不同的内容项,我收到此错误: c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroot95ad0ba420f230f7App_Web__sitecorelayout.cshtml.5d96958d.682ppzj_.0.cs(
遇到奇怪的Sitecore错误.使用MVC将Sitecore 6.6中的布局应用于几个不同的内容项,我收到此错误:
c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroot95ad0ba420f230f7App_Web__sitecorelayout.cshtml.5d96958d.682ppzj_.0.cs(24): error CS0234: The type or namespace name 'Kernel' does not exist in the namespace 'Sitecore' (are you missing an assembly reference?) System.Web.HttpCompileException (0x80004005): c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesroot95ad0ba420f230f7App_Web__sitecorelayout.cshtml.5d96958d.682ppzj_.0.cs(24): error CS0234: The type or namespace name 'Kernel' does not exist in the namespace 'Sitecore' (are you missing an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile,Boolean throwIfNotFound,Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context,VirtualPath virtualPath,Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath,HttpContext context,Boolean throwIfNotFound) at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.FileExists(String virtualPath) at System.Web.Mvc.VirtualPathProviderViewEngine.GetPathFromSpecificName(ControllerContext controllerContext,String name,String cacheKey,String[]& searchedLocations) at System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext,String[] locations,String[] areaLocations,String locationsPropertyName,String controllerName,String cacheKeyPrefix,Boolean useCache,String[]& searchedLocations) at System.Web.Mvc.VirtualPathProviderViewEngine.FindPartialView(ControllerContext controllerContext,String partialViewName,Boolean useCache) at System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup,Boolean trackSearchedPaths) at System.Web.Mvc.HtmlHelper.FindPartialView(ViewContext viewContext,ViewEngineCollection viewEngineCollection) at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName,ViewDataDictionary viewData,Object model,TextWriter writer,ViewEngineCollection viewEngineCollection) at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper,ViewDataDictionary viewData) at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer,RenderRenderingArgs args) at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) at (Object,Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName,TArgs args) at Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext,TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter,ResultExecutingContext preContext,Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter,Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext,IList`1 filters,ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext,String actionName) 事情被设置为IIS中的构建和应用程序池的4框架.我不知所措.这种情况发生在同一场景中的任何人身上吗? 解决方法
该问题是在Views目录中的web.config文件的名称空间部分中添加了Sitecore.Kernel名称空间的结果.删除它解决了问题.
使用Sitecore支持来解决问题.大约半个小时前就知道了. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 如何手动检查模型是否有效并获取错误消息
- asp.net – Url重写与路由
- asp.net – 我应该在服务层或控制器层发送电子邮件吗?
- asp.net – <%%>和<%=%>之间有什么区别?
- asp.net-mvc – MVC:创建应用程序基本URL链接的最简单方法
- ASP.NET:如何将App_Data部署到webhost?
- ASP.NET WebSite发布与复制?
- asp.net – 在不使用HttpRequest的情况下获取主机名
- asp.net – GridView分页 – 第一,最后,下一个,上一个
- asp.net-mvc – 使用ViewModel模式与MVC 2强类型的HTML助手
推荐文章
站长推荐
- asp.net-web-api-405使用AttributeRouting.PUTAt
- asp.net-mvc – 什么是强类型的视图在ASP.NET MV
- MVC5 - ASP.NET Identity登录原理 - Claims-base
- asp.net-web-api – WebAPI重定向不起作用?
- asp.net-mvc – 如何通过Resharper 8.2.1停止INC
- asp.net – 发布管理 – 发布给用户的一小部分 –
- asp.net – 在PreRender上添加控件页面
- 如何从Asp.Net Code Behind调用JavaScript函数?
- asp.net-mvc – Error.aspx – 如何关闭?
- asp.net – 重定向到一个页面,其endResponse为tr
热点阅读