1

我在配置 EPi CMS 5 以在 IIS7.5 下运行时遇到此异常。

异常详细信息:System.IO.FileNotFoundException:无法加载文件或程序集“EPiServer.Framework”或其依赖项之一。

源错误:在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。程序集加载跟踪:以下信息有助于确定无法加载程序集“EPiServer.Framework”的原因。

 WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value

[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) 为 1。注意:与程序集绑定失败日志记录相关的一些性能损失。要关闭此功能,请删除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。堆栈跟踪:

 [FileNotFoundException: Could not load file or assembly 'EPiServer.Framework' or one of its dependencies. Det går inte att

命中文件。] System.RuntimeTypeHandle.GetTypeByName(字符串名称,布尔 throwOnError,布尔 ignoreCase,布尔反射仅,StackCrawlMarkHandle stackMark,布尔 loadTypeFromPartialName,ObjectHandleOnStack 类型)+0
System.RuntimeTypeHandle.GetTypeByName(字符串名称,布尔 throwOnError,布尔 ignoreCase,布尔反射, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +95
System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectOnly, StackCrawlMark& stackMark) +54 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65
System .Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +69
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +52 [ConfigurationErrorsException: 无法加载文件或程序集“EPiServer.Framework”或其依赖项之一。Det går inte att hitta filen.] System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +360
System.Web.Configuration.ConfigUtil.GetType(String typeName , String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +27
System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +44 System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +52 System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +200
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1365 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +95
System .Web.HttpApplication.InitSpecial(HttpApplicationState 状态,MethodInfo[] 处理程序,IntPtr appContext,HttpContext 上下文)+194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253 [HttpException (0x80004005): 无法加载文件或程序集“EPiServer.Framework”或一个其依赖项。详细信息。] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9080108
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256

4

1 回答 1

1

检查应用程序的 /Bin 文件夹并查看 EPiServer.Framework DLL 是否存在。如果不是,您可以通过右键单击解决方案资源管理器中的“引用”文件夹中的 DLL 并选择“属性”将 DLL 设置为“复制本地”,然后将“复制本地”设置为“真”。现在,当您构建解决方案时,DLL 将从它的参考位置复制到 Bin 文件夹中。您可能需要对所有 EPiServer DLL 执行此操作。

我过去曾遇到过这种情况,即使启用了“特定版本”,加载正确的 DLL 仍然存在问题。我们解决它的一种方法是将所有 EPiServer DLL 复制到我们解决方案目录中的 Lib 文件夹中,并添加对这些 DLL 的引用,保持特定版本和复制本地设置为 true。

于 2012-11-30T08:09:40.783 回答