我正在将经典的asp站点从Windows 2003 IIS 6 .net framework 1.1迁移到Windows 2008 32位IIS7 .net framework 2.0。我在装配装载时面临一些奇怪的问题。
有一组用C#1.1编写的Com可调用包装器dll,这些dll使用在GAC中注册的dll(IConfigSectionHandler实现)。
Com callable wrapper无法加载此gac dll和fusion日志说;
*** Assembly Binder Log Entry (3/30/2015 @ 6:22:28 AM) *** The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable c:\windows\system32\inetsrv\w3wp.exe --- A detailed error log follows. === Pre-bind state information === LOG: User = NT AUTHORITY\IUSR LOG: DisplayName = Enterprise.Configuration (Partial) LOG: Appbase = file:///c:/windows/system32/inetsrv/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = w3wp.exe Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Enterprise.Configuration.DLL. LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Enterprise.Configuration/Enterprise.Configuration.DLL. LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Enterprise.Configuration.EXE. LOG: Attempting download of new URL file:///c:/windows/system32/inetsrv/Enterprise.Configuration/Enterprise.Configuration.EXE. LOG: All probing URLs attempted and failed.
如果我把这个dll放到c:/ windows / system32 / inetsrv,它会在第二次尝试时加载。(如果我在第一次失败时刷新网站)
Com可调用包装器也在第二次尝试时加载,它也以相同的方式搜索Com可调用包装器,并且第一次无法加载。
为什么CLR在c:/ windows / system32 / inetsrv中搜索Com可调用包装器以及为什么GAC注册的dll也会在同一位置搜索。
任何想法