我遇到了我們在這裏的服務問題。Oracle.DataAccess出錯
我有這個錯誤:
System.IO.FileNotFoundException : Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=X' or one of its dependencies.'
所以,我猜我會在我的項目的bin文件夾添加DLL的,沒什麼太大了吧?
然後,我有這樣的錯誤:
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.
好吧,我以前見過這個,只要到應用程序池,並設置了「啓用32位應用程序」爲true ....對嗎?
OpenDBConnection: Error occurred. System.TypeInitializationException:
The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.
---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
好吧...沒問題,讓我檢查一下:服務器是2008 R2企業版x64。然後我會編譯成x64。
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.
現在,這個爛攤子已經持續了幾天。我生氣了,因爲我明顯在轉圈,但無法確定出口的位置。
我安裝了Oracle 1120_32和1120_64(這是11.2.0.2.0版本),安裝了.NET 4.0。 我試過編譯「任何CPU」。 我試過將dll屬性設置爲「Specific version = false」,「Copy Local = true」,以及相反。 我已經試過了讓程序的舊版本,並在代碼中進行所需的更改後重新編譯它們,保留舊的配置。 我試着繞着一個仙人掌唱歌,「請大條例草案,讓這個DLL加載」。
我檢查了很多鏈接,但是這發生在遠程環境中,所以我沒有選擇設置斷點或任何可以看到的程序試圖加載的任何dll,並且大多數鏈接建議(re )在服務器上安裝oracle客戶端,但是因爲我不得不向管理員詢問這個問題,所以我寧願確認那裏沒有最後的嘗試。
有人可以幫忙嗎?
您是如何安裝32位和64位Oracle客戶端的?看看這個指令:http://stackoverflow.com/questions/24104210/badimageformatexception-this-will-occur-when-running-in-64-bit-mode-with-the-32#24120100,resp。 http://stackoverflow.com/questions/659341/the-provider-is-not-compatible-with-the-version-of-oracle-client#25412992 –
@WernfriedDomscheit以及我不是服務器管理員,所以我沒有沒有安裝任何東西:)正如在帖子中所說,我已經看到帖子說重新安裝'可能'做的伎倆,但我希望其他東西... – DoctorPrisme
聽起來很奇怪,但我有一些類似的東西回來與我相信VS2013。解決方法是刪除(刪除)VS中的引用,然後將其添加回去(32位odac)。 – tbone