如何使用进程监视器确定哪个 DLL 导致 BadImageFormatException
我有一个大型 Web 应用程序,它应该在 64 位进程中运行。但是,当我在应用程序池上将“启用 32 位应用程序”设置为 False 时,尝试在 IE 中运行该应用程序时出现以下错误:
不是有效的 Win32 应用程序。 (HRESULT 异常:0x800700C1)
错误消息开头的应用程序名称丢失,即我在复制和粘贴过程中没有丢失它。
有人建议我使用进程监视器来确定哪个应用程序/DLL 加载实际上导致了错误,但我不知道从哪里开始。有人可以建议吗?
编辑: 我曾尝试仅在 w3wp.exe 以及文件系统和进程事件上过滤进程监视器,但仅尝试导航到根 URL 就会产生 34,012 个事件。
I have a large web application, which is supposed to run in a 64 bit process. However, when I set "Enable 32-bit Applications" to False on my App Pool, I get the following error trying to run the app in IE:
is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
The application name at he beginning of the error message is missing, i.e. I have not lost it during copy and paste.
I have been advised to use Process Monitor to determine which application/DLL load is actually causing the error, but I have no idea where to start with this. Could somebody please advise?
EDIT: I have tried filtering Process Monitor on only w3wp.exe and only file system and process events, but simply attempting a navigate to the root URL yields 34,012 events.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建一个仅针对 x64 构建的控制台应用程序,并使用它来动态地一一加载所有引用的 dll,并在加载之间提供控制台输出。当控制台应用程序无法加载其中一个 dll 时,您就会知道它是哪一个。
Create a console application that is built to be x64 only and use it to dynamically load all the referenced dll's one by one with console output between loads. When the console application fails to load one of the dll's, you'll know which one it is.
我假设这是一个 ASP.Net 应用程序。您是否将主要 Web 项目平台目标设置为 x86。
您可以在项目属性 | 中找到该设置。构建 |平台目标
另外,您的项目是否引用了任何第三方库?如果是的话你知道它们是 32 位还是 64 位 dll 吗?
I'm assuming this is a ASP.Net application. Have you set your main web project(s) Platform Target to x86.
You can find the setting in Project Properties | Build | Platform target
Also do any of your projects reference any 3rd Party Libraries? If so do you know whether they are 32-bit or 64-bit dlls?