簡體   English   中英

c# Web 服務引用 c# 項目引用 Z5884E40D596370BE5406F2711AD9E39

[英]c# Web Service referencing c# project referencing DLL

好吧,也許這是不可取的,但我正在為現有應用程序編寫 Web 服務。 I'm trying to use the C# Library we wrote for the project, and that C# Library uses functions from a dll that is not acreated from a .NET project. I know the DLL isn't a problem, because the actual application (A windows form application) that uses the c# Library has no problem performing operations that use this dll, but my web service always crashes when the dll methods are called. 例外是:

“無法加載 DLL 'foo.dll':找不到指定的模塊。(來自 HRESULT 的異常:0x8007007E)”} System.Exception {System.DllNotFoundException}

從 c# 庫導入的示例:

[DllImport("foo.dll")]
protected static extern void DllFunction(string param1, int param2, int param3);

我嘗試將 foo.dll 添加到我的項目的 Bin 目錄中,但這不起作用。 我覺得我一定錯過了一些非常明顯的東西。 有什么建議么? 我已經閱讀了一些關於 DLL 和 web 服務的時髦內容,並嘗試了一些修復程序,例如http://sites.google.com/site/tosapage/programming/asp-net#dll ,但它們不起作用。

我會用depends.exe運行 winforms exe。 對於您正在調用的 dll 需要的戴爾,您可能會遇到該錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM