2012-10-31 60 views
0

我試圖讓應用程序在我被分配支持的IIS 6.0上運行。IIS無法加載全局類型,儘管現有的DLL

我將所有源代碼和二進制文件複製到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存在並且被正確編譯,所以我沒有看到這個問題...

+0

是否有任何32/64位問題。你打開[融合日誌記錄](http://blogs.msdn.com/b/thottams/archive/2007/06/02/debugging-load-problems-using-fusion-log.aspx)? –

+0

這是所有編譯和運行在32位計算機上,並在32位目標上... –

+0

您檢查了融合日誌記錄選項嗎? –

回答

1

再現來自注釋的解決方案......

第1步是使Fusion Logging得到一個日誌什麼是失敗的

這產生了日誌文件,指出IIS試圖在.Net Framework的1.1版本下啓動DLL。當它試圖讀取dll的清單時發生錯誤。

這表明該dll來自該框架的更高版本,因此無法加載。

相關問題