gpt4 book ai didi

c# - IIS 6.0 64 位 : SysInterals Proc Explorer showing 32-bit DLLs loaded?

转载 作者:行者123 更新时间:2023-11-30 15:42:00 27 4
gpt4 key购买 nike

试图确定一个问题,该问题很可能是由于我们的 Web 应用程序在 IIS 以 64 位运行时尝试加载 32 位版本的 OracleAccess.dll(看起来既有 32 位也有 64 位)不同版本的 Oracle 驱动程序可以并排安装)。

我在服务器上有两个站点,一个用于生产,一个用于测试。生产环境中的代码是由一名已离职的员工部署的。那个网站有效。我们刚刚部署的另一个站点;它是为 Any CPU 编译的,我们在加载 Oracle 驱动程序时遇到错误。

如果我在 SysInternal 的进程资源管理器中查看生产站点的 IIS 工作进程,突出显示 IIS 工作进程,并在下方 Pane View 中查看加载的 DLL,我会看到一些奇怪的数据。

工作进程的信息:

Process   Version        User Name                     PID   Image Type
w3wp.exe 6.0.3790.3959 NT AUTHORITY\NETWORK SERVICE 3320 64-bit

但是在加载的DLL列表中,有的列为64位图像,有的列为32位?不可能 (AFAIK) 将 32 位 DLL 加载到 64 位进程空间中,所以我可能不理解我看到的报告。

DLL 句柄信息的子集:

Name                Image Type   Description                          Company Name            Version         
aspnet_filter.dll 64-bit Microsoft ASP.NET ISAPI Filter DLL Microsoft Corporation 4.0.30319.1
admwprox.dll 64-bit IIS Admin Com API Proxy dll Microsoft Corporation 6.0.3790.3959
adsldp.dll 64-bit ADs LDAP Provider DLL Microsoft Corporation 5.2.3790.3959
adsldpc.dll 64-bit ADs LDAP Provider C DLL Microsoft Corporation 5.2.3790.3959
advapi32.dll 64-bit Advanced Windows 32 Base API Microsoft Corporation 5.2.3790.4555
aspnet_filter.dll 64-bit Microsoft ASP.NET ISAPI Filter DLL Microsoft Corporation 4.0.30319.1
aspnet_isapi.dll 64-bit Microsoft ASP.NET ISAPI Shim DLL Microsoft Corporation 2.0.50727.3053
comctl32.dll 64-bit Common Controls Library Microsoft Corporation 5.82.3790.4770
comctl32.dll 64-bit User Experience Controls Library Microsoft Corporation 6.0.3790.4770
comres.dll 64-bit COM+ Resources Microsoft Corporation 2001.12.4720.3959

(Next few are our DLLs)

CSA.Database.DLL 32-bit CSA.Database TE 1.7.8221.0
CSA.Database.DLL 32-bit CSA.Database TE 1.7.8221.0
CSA.Loggers.DLL 32-bit CSA.Loggers TE 1.7.8221.0
CSA.Loggers.DLL 32-bit CSA.Loggers TE 1.7.8221.0
CSA.Network.DLL 32-bit CSA.Network TE 1.7.8221.0
CSA.Network.DLL 32-bit CSA.Network TE 1.7.8221.0
Enterprise.Data.DLL 32-bit Enterprise.Data TE 2.35.3.0
Enterprise.Data.DLL 32-bit Enterprise.Data TE 2.35.3.0
Enterprise.Diagnostics.DLL 32-bit Enterprise.Diagnostics TE 2.35.3.0
Enterprise.Diagnostics.DLL 32-bit Enterprise.Diagnostics TE 2.35.3.0

(More Microsoft DLLs... some 32-bit, some 64-bit??)

FederatedLibrary.DLL 32-bit FederatedLibrary Microsoft 1.0.0.0
FederatedLibrary.DLL 32-bit FederatedLibrary Microsoft 1.0.0.0
gdi32.dll 64-bit GDI Client DLL Microsoft Corporation 5.2.3790.4396
gzip.dll 64-bit GZIP Compressn DLL Microsoft Corporation 6.0.3790.1830

Microsoft.Practices.EnterpriseLibrary.Common.DLL 32-bit Enterprise Library Shared Library Microsoft Corporation 4.1.0.0
Microsoft.Practices.EnterpriseLibrary.Common.DLL 32-bit Enterprise Library Shared Library Microsoft Corporation 4.1.0.0
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.DLL 32-bit Enterprise Library Exception Handling Application Block Microsoft Corporation 4.1.0.0
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.DLL 32-bit Enterprise Library Exception Handling Application Block Microsoft Corporation 4.1.0.0
Microsoft.Practices.EnterpriseLibrary.Logging.DLL 32-bit Enterprise Library Logging Application Block Microsoft Corporation 4.1.0.0
Microsoft.Practices.EnterpriseLibrary.Logging.DLL 32-bit Enterprise Library Logging Application Block Microsoft Corporation 4.1.0.0

(And finally, the Oracle drivers that seem to be causing issue... 64-bit)

oracle.dataaccess.dll 64-bit Oracle.DataAccess.dll Oracle Corporation 2.112.1.0
oracle.dataaccess.dll 64-bit Oracle.DataAccess.dll Oracle Corporation 2.112.1.0

我已经使用 corflags 查看工作的生产 DLL 是否明确编译为 32 位......如果我理解输出,它们不是。

C:\SingleSignOn\bin>corflags CSA.Network.dll
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

Version : v2.0.50727
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0


理解为什么我们新编译的部署不起作用的第一步是理解为什么当前的部署起作用。任何人都可以向我解释我所看到的吗?

我需要知道的:

  1. IIS 是否作为 64 位进程运行,它会加载 任何 CPU DLL 作为 64 位吗?
  2. 如果是,为什么 Process Explorer 将这些 DLL 列为 32 位图像?
  3. IIS 是否可以将 32 位 DLL 加载到 64 位进程空间?
  4. 如果 IIS 是一个 64 位进程,并且我们加载一个编译为 Any CPU 的网站,如果它依赖的任何 DLL 是 32 位 DLL(例如它是针对 32 位版本的 Oracle 驱动程序编译的?)

提前致谢...

最佳答案

Process Explorer 仅将 AnyCPU DLL 报告为 32 位。包含此信息的 PE header 中的插槽没有针对 AnyCPU 的设置,因此编译器将它们标记为 32 位。但请放心,64 位进程只会加载 64 位 DLL,或强制进入 64 位模式的 AnyCPU DLL。

native DLL、comctl32、gdi32 被标记为 64 位,这证明您的进程和其中的所有代码都以 64 位运行。只是 AnyCPU DLL 具有误导性。

关于c# - IIS 6.0 64 位 : SysInterals Proc Explorer showing 32-bit DLLs loaded?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7827219/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com