尽管存在dll,IIS仍无法加载全局类型

时间:2012-10-31 14:01:53

标签: asp.net .net iis-6

我正在尝试让一个应用程序在我被分配支持的IIS 6.0上运行。

我将所有源和二进制文件复制到Inetput文件夹。 WebApp正在运行,但是我收到的错误告诉我无法加载应用程序的全局类型。

我该如何调试?命名空间是正确的,DLL存在于应用程序的/ bin /文件夹中,但仍然无法加载它。

启用Fusion日志记录后,我发现此错误文件与我的全局类有关;

*** Assembly Binder Log Entry  (05.11.2012 @ 08:45:30) ***

The operation failed.
Bind result: hr = 0x80131107. No description available.

Assembly manager loaded from:  C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable  c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = MyApplication
 (Partial)
LOG: Appbase = file:///c:/inetpub/wwwroot/MyApplication
LOG: Initial PrivatePath = bin
LOG: Dynamic Base = C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\MyApplication\a1144233
LOG: Cache Base = C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\MyApplication\a1144233
LOG: AppName = 1ec25e47
Calling assembly : (Unknown).
===

LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: MyApplication
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/MyApplication/a1144233/1ec25e47/MyApplication.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/MyApplication/a1144233/1ec25e47/MyApplication/MyApplication.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/MyApplication/bin/MyApplication.DLL.
LOG: Assembly download was successful. Attempting setup of file: c:\inetpub\wwwroot\MyApplication\bin\MyApplication.DLL
LOG: Entering download cache setup phase.
ERR: Error extracting manifest import from file (hr = 0x80131107).
ERR: Setup failed with hr = 0x80131107.
ERR: Failed to complete setup of assembly (hr = 0x80131107). Probing terminated.

那里出了什么问题? bin\MyApplication.DLL存在且编译正确,所以我没有看到问题...

1 个答案:

答案 0 :(得分:1)

从评论中重现解决方案......

第1步是让Fusion Logging能够记录失败的内容

这产生了一个日志文件,表明IIS正试图在.Net Framework的1.1版本下启动DLL。然后在尝试读取dll的清单时发生错误。

这表明dll来自框架的更高版本,因此无法加载。