【发布时间】:2011-12-11 06:00:25
【问题描述】:
试图确定一个问题,该问题很可能是由于我们的 Web 应用程序在 IIS 以 64 位运行时尝试加载 32 位版本的 OracleAccess.dll(它看起来像 32 位和 64 位版本的 Oracle 驱动程序可以并行安装)。
我在服务器上有两个站点,一个用于生产,一个用于测试。生产版本的代码由不再与我们在一起的员工部署。该网站有效。我们刚刚部署的另一个站点;它是为 Any CPU 编译的,我们在加载 Oracle 驱动程序时遇到错误。
如果我在 SysInternal 的进程资源管理器中查看生产站点的 IIS 工作进程,突出显示 IIS 工作进程,并在下部窗格视图中查看加载的 DLL,我会看到一些奇怪的数据。
工作进程的信息:
Process Version User Name PID Image Type
w3wp.exe 6.0.3790.3959 NT AUTHORITY\NETWORK SERVICE 3320 64-bit
但是在加载的DLL列表中,有的被列为64位图像,有的被列为32位?将 32 位 DLL 加载到 64 位进程空间中是不可能的(AFAIK),所以我可能不理解我看到的报告。
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
了解为什么我们新编译的部署不起作用的第一步是了解为什么当前的部署起作用。谁能给我解释一下我看到了什么?
我需要知道的:
- IIS 是否作为 64 位进程运行,是否会将
Any CPUDLL 加载为 64 位? - 如果是,为什么 Process Explorer 将这些 DLL 列为 32 位图像?
- IIS 是否可以将 32 位 DLL 加载到 64 位进程空间中?
- 如果 IIS 是 64 位进程,并且我们加载编译为
Any CPU的网站,如果它所依赖的任何 DLL 是 32 位 DLL(例如,它是针对 32 -bit 版本的 Oracle 驱动程序?)
提前谢谢...
【问题讨论】:
标签: c# iis compiler-construction iis-6 32bit-64bit