我正在加载一个在 IIS7 和 IIS6 中使用 BlogEngine4 构建的博客,我已经完成了所有配置,并在 Google 的帮助下通过所有可能性缩小了问题范围。但我最终得到以下错误。谁有聪明的答案?
所有页面都加载正常,但仅当我加载 .cshtml 文件页面未加载时
“/blog”应用程序中的服务器错误。
Could not locate Razor Host Factory type: umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines
说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
Exception Details: System.InvalidOperationException: Could not locate Razor Host Factory type: umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines
源错误:
在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。
Stack Trace:
[InvalidOperationException: Could not locate Razor Host Factory type: umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines]
System.Web.WebPages.Razor.WebRazorHostFactory.CreateFactory(String typeName) +178
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +64System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfigCore(RazorWebSectionGroup config, String virtualPath, String physicalPath) +201
System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(String virtualPath, String physicalPath) +41
System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(String virtualPath) +7
System.Web.WebPages.Razor.RazorBuildProvider.GetHostFromConfig() +16
System.Web.WebPages.Razor.RazorBuildProvider.CreateHost() +17
System.Web.WebPages.Razor.RazorBuildProvider.get_Host() +21
System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode() +66
System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType() +39
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) +94
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() +207
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +41
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +658
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +360
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +107
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +96
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp) +13
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +45
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(String virtualPath, Type requiredBaseType) +23
System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType(String virtualPath) +228
System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance(IVirtualPathFactory factory, String virtualPath) +147
System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType(String virtualPath) +192
System.Web.WebPages.VirtualPathFactoryExtensions.CreateInstance(IVirtualPathFactory factory, String virtualPath) +74
System.Web.WebPages.WebPageHttpHandler.CreateFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory) +24
System.Web.WebPages.WebPageHttpHandler.CreateFromVirtualPath(String virtualPath) +20
System.Web.WebPages.WebPageRoute.DoPostResolveRequestCache(HttpContextBase context) +250
System.Web.WebPages.WebPageHttpModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +94
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +135
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +168
版本信息:Microsoft .NET Framework 版本:4.0.30319;ASP.NET 版本:4.0.30319.272