在MS的Visual Web Developer中,我有一個完全默認的ASP.NET Web服務項目和另一個項目。當使用右鍵菜單上的第二個項目運行「添加服務引用」,我能找到列爲選項的第一個項目,但我得到一個錯誤,當我嘗試選擇它,我得到一個錯誤「添加服務引用」失敗VS
Metadata contains a reference that cannot be resolved: 'http://0.0.0.0:3495/Service1.asmx?wsdl'. There was an error downloading 'http://0.0.0.0:3495/Service1.asmx?wsdl'. Unable to connect to the remote server The requested address is not valid in its context 0.0.0.0:3495 Metadata contains a reference that cannot be resolved: 'http://localhost:3495/Service1.asmx'. Metadata contains a reference that cannot be resolved: 'http://localhost:3495/Service1.asmx'. If the service is defined in the current solution, try building the solution and adding the service reference again.
我在使用WCF服務時也遇到同樣的問題。
我在做什麼錯?
我發現this reference有this service和事情的工作。 (WhyT_不默認服務只是工作?)
沒有喜悅,按Ctrl-F5似乎開始服務,但我仍然得到同樣的錯誤,如果只是F5變灰「添加服務」選項,並IIRC沒有工作,即使我在另一個VS會話中打開相同的解決方案。 – BCS 2009-04-17 21:53:14
嗯......你可以嘗試使用IIS來調試你的服務,然後嘗試添加引用。 – 2009-04-17 21:55:32