【问题标题】:ASP .NET Core Web API load 32bit library in IIS leads to BadImageFormatException with 32bit enabledASP .NET Core Web API 在 IIS 中加载 32 位库导致启用 32 位的 BadImageFormatException
【发布时间】:2020-09-16 23:37:03
【问题描述】:

所以我想在 IIS 中运行一个 ASP .NET Core 3.1 Web API,它需要加载一个 32 位库。所以我刚刚在 ApplicationPool 中启用了 32 位功能。在 TaskManager 中也可以看到该进程是 32 位的。我还设置安装了 32 位 dotnet sdk 并将 PATH 变量设置为 32 位版本。但是我总是想执行一个加载 32 位程序集的方法,我得到一个 System.BadImageFormatException: Could not load file or assembly 错误,这意味着该进程是 64 位的? 当我在没有 IIS 的情况下启动时,它工作得很好。

为了构建,我使用了 win-x86 运行时

【问题讨论】:

  • 不幸的是,BadImageFormatException 可能会被抛出位不匹配的场景。揭示异常的调用堆栈,这可能会更多地说明原因。
  • @LexLi 所以这是完整的调用栈:pastebin.com/DHVE6f1z

标签: asp.net-core iis .net-core 32bit-64bit asp.net-core-3.1


【解决方案1】:

所以我设法通过安装Visual C++ 2013 Redistributable解决了我的问题

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2019-05-06
  • 2016-12-18
  • 2016-02-13
  • 2011-02-13
  • 2023-03-26
  • 2011-01-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多