我已經開發了一個帶有Visual Studio的asmx webservice,並且我通過複製所有文件在具有3.5 Framework的IIS 7上部署。我的asmx webservice在本地工作,但不在遠程IIS上部署時7
測試時,它說
Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
爲什麼它會嘗試加載System.Web.Extensions程序我不使用[System.Web.Script.Services.ScriptService]所以我不明白。
所以我在Visual Studio改變從.NET 2〜3.5,但得到另一個錯誤:
Could not load file or assembly 'WebServiceTest' or one of its dependencies. An attempt was made to load a program with an incorrect format.
如何解決這一問題?注意:我沒有使用任何其他程序集/ lib我只是在學習webservice,所以它非常簡單:我創建了一個webservice Test.asmx,其中一個方法使用同一個名稱空間WebServiceTest中的一個類Test.cs。這在當地適用。
最後我都從頭開始,現在它的作品,我覺得我已經通過重命名空間,類等
我沒有使用任何東西我只是在學習webservice,所以它非常簡單:我創建了一個webservice Test.asmx,其中一個方法使用同一個名稱空間WebServiceTest中的一個類Test.cs。 – user310291 2010-09-25 14:26:09
您的應用程序定位了什麼框架?你有什麼參考? – 2010-09-25 14:27:23
正如我在主帖中添加的,我瞄準的是.NET 2,然後是3.5,最後與服務器相同。 – user310291 2010-09-25 14:28:15