我正在使用C#作爲語言在Visual Web Developer Express Edition 2008下的Web站點項目(而不是Web應用程序)上工作。ASP.NET編譯錯誤
在網站上我有一個參考服務(服務器中的ASMX文件)。當我在本地運行應用程序,它可以顯示Default.aspx的,沒有任何問題,但是當我把它上傳到我的託管網站它給了我一個「編譯錯誤」:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'ServiceModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
Source Error:
[No relevant source lines]
Source File: App_WebReferences.doheyfto.0.cs Line: 791
我不爲什麼它給這個錯誤,我在Web應用程序項目中使用了相同的服務引用,並且工作正常。
我嘗試手動添加對System.ServiceModel.Web的引用到我的項目中,並且還將相應的DLL文件複製到BIN文件夾,但隨後在不同的命名空間上出現錯誤,我認爲這不是解決方案,我猜測被引用的名稱空間(來自.NET Framework)應該自動添加到項目中,它不應該像那樣工作嗎?
謝謝大家提前
我發現了一些有趣的東西,它看起來像網站是指的DLL從路徑我的電腦,它不是試圖使用主機提供商的計算機中的DLL – Arturo 2010-11-10 02:00:32