2013-04-11 27 views
0

嘗試執行我的Web應用程序時,它會引發以下錯誤。
它說Matrix.Data.dll無法加載。我試圖重新組裝並重新引用它。但沒用。
此外,它顯示一個警告'裝配綁定日誌已關閉'
以及與裝配綁定失敗日誌記錄相關的性能損失是什麼......?System.IO.FileLoadException:無法加載文件或程序集

錯誤詳細:

System.IO.FileLoadException: Could not load file or assembly 'Matrix.Data, Version=5.0.3.16, 
Culture=neutral, PublicKeyToken=ed19106b2f44b5a8' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. 
(Exception from HRESULT: 0x80131040) 

File name: 'Matrix.Data, Version=5.0.3.16, Culture=neutral, 
PublicKeyToken=ed19106b2f44b5a8' 
at Matrix.Administration._Administration.DoRequest(Boolean& plReplacePlaceholders) 
at Matrix.AppServerHTTPHandler.doRequestDefault() 
in D:\FX\AppServer\Appserver.vb:line 443 
at AppServer.AppServerHTTPHandler.doRequest(Kernel pKernel) 
in D:\FX\AppServer\Appserver.vb:line 373 
at AppServer.AppServerHTTPHandler.processRequest(HttpContext context) 
in D:\FX\AppServer\Appserver.vb:line 107 

WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value 
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated 
with assembly bind failure logging. 
To turn this feature off, remove the registry value 
[HKLM\Software\Microsoft\Fusion!EnableLog]. 
+1

將[Dependency Walker](http://www.dependencywalker.com/)下載到已部署的位置,打開該程序集並確保它不缺少依賴關係。如果它不是,那麼加載它的一些依賴關係並查看它們缺少的內容。 – 2013-04-11 16:59:24

+1

它可能是你在這裏有不匹配的.Net版本? – wonko79 2013-04-11 17:02:03

+1

@ wonko79:我檢查了引用程序集的.Net版本,它們在V3.5中相同,並使用VS2008創建。有一件事指出,他們是32位程序集試圖在64位操作系統的IIS中執行....是一個問題...? – Sunil 2013-04-11 18:13:51

回答

1

你Accessibility.dll是最有可能損壞。即使以管理員身份,您也無法刪除該文件。

您必須進入安全設置並將所有者從TrustedInstaller更改爲其他用戶,併爲您自己授予文件權限。完成後,從工作的計算機上獲取Accessibility.dll並替換損壞的版本。

最好我猜測,微軟的一個安裝程序破壞了DLL,因爲沒有用戶有權編輯/刪除/替換TrustedInstaller擁有的文件。

+1

謝謝@Ashok。我會檢查。 – Sunil 2013-04-11 18:02:25

相關問題