【问题标题】:Could not load file or assembly 'Microsoft.JScript... or one of its dependencies... what gives?无法加载文件或程序集'Microsoft.JScript...或其依赖项之一...提供了什么?
【发布时间】:2011-04-03 22:05:53
【问题描述】:

这是什么意思?这只发生在我的本地 IIS 上,该站点过去运行良好,没问题,它在我们的 DEV/QA 服务器上运行良好,但在我的本地机器上我得到了这个,什么给出?我不知道我们曾经使用过 Microsoft.JScript,并且搜索该项目一无所获......

Could not load file or assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.

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: System.BadImageFormatException: Could not load file or assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace: 


[BadImageFormatException: Could not load file or assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.]
   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +62
   System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +42
   System.Type.GetType(String typeName) +65
   System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +13
   System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +3182
   System.Web.Configuration.CompilationSection.get_RecompilationHash() +73
   System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2(StandardDiskBuildResultCache diskCache) +684
   System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(StandardDiskBuildResultCache diskCache) +50
   System.Web.Compilation.BuildManager.Initialize() +320
   System.Web.Compilation.BuildManager.InitializeBuildManager() +11203871
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +498

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11301302
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4338644

更新:当我尝试通过本地 IIS 浏览任何内容时也会发生这种情况,而不仅仅是我的网络应用程序!虽然我的网络应用根本没有使用这个东西...我什至无法在浏览器中加载 ASP.NET 配置设置。

【问题讨论】:

    标签: asp.net-mvc visual-studio-2008 iis-7 assemblies


    【解决方案1】:

    没有发布的解决方案有效,我需要在下一个工作日恢复并运行它。恢复到出厂默认设置并重新安装了所有东西,只用了大约 4 个小时的时间来照顾一些恢复软件 + 重新打开 VS、svn、filezilla、notepad++、sql 管理器。

    现在一切都很好:P

    【讨论】:

      【解决方案2】:

      您应该尝试按照错误消息中的说明启用程序集绑定失败日志记录。这应该为您提供有关失败的原因和原因的更多信息。 如果这对你不起作用,那么你可以尝试使用 msft 的过程监视器。 Procmon 会告诉你你的网络服务器试图加载的所有文件。

      【讨论】:

      • 也试过了,没有定论。这就是最初导致我怀疑磁盘问题并运行检查磁盘的原因,但它很好。
      【解决方案3】:

      它可能与this bug 有关,这似乎可以通过安装适用于 Windows Vista 的 SP2 来解决(当然,如果这是您的情况)。

      我能想到的另一个可能的原因是您运行的是 64 位操作系统并且程序集已编译为 32 位,尽管可能性较小。在这种情况下,您可以尝试在 IIS 中设置应用程序池以启用 32 位支持:

      要排除这种可能性,您可以检查处理器架构 Microsoft.JScript 程序集已针对:MSIL、x86、x64 进行编译

      【讨论】:

      • 我在哪里设置这个?这是在 IIS 中吗?如果不只是记住此错误并非特定于一个应用程序,它是由我尝试通过 Web 浏览器通过 IIS 访问的所有内容引发的,甚至是 Microsoft 内置的配置页面或我尝试的任何 Web 应用程序。另请注意,这是突然发生的,一周前工作正常。 (Win7,64)
      • 是的,这是在 IIS 应用程序池的属性中。
      • 没有这样的运气,看起来与此无关。我想今晚我只是要重新安装 Windows。
      • @Ryan,在采取如此激烈的措施之前,请尝试重新安装 Visual Studio 和 .NET 框架(并不是说这并不严重,但与重新安装 Windows 相比:-))。
      • 我也试过了,其实没那么激烈。昨晚我将所有文件复制到外部驱动器,并恢复出厂默认设置。快速重新安装了所有东西,只复制了我真正需要的数据。这只是一个 4-5 小时的交易,具体取决于您必须复制多少数据。我喜欢这样做,因为它使系统更加快速。
      【解决方案4】:

      您是否尝试过清洁您的解决方案?

      构建 -> 清洁解决方案

      如果这无助于关闭 Visual Studio,删除 bin 文件夹中的所有内容,然后重新打开解决方案,然后重新构建解决方案。

      【讨论】:

      • 没有这样的运气,我的 bin 文件夹中也只生成了 3 个文件,其余的我无法删除(第三方 DLL)
      猜你喜欢
      • 2021-12-12
      • 2012-01-14
      • 1970-01-01
      相关资源
      最近更新 更多