我试图让应用程序在我被分配支持的 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
存在并正确编译,所以我看不到问题...