簡體   English   中英

Web服務URL在網站中不起作用(作為服務參考)

[英]Web Service URL is not working in a Website(as a Service Reference)

我正在使用Visual Studio 2012制作Web服務。 我已經為Web服務編寫了代碼,但是當我嘗試通過將其添加為服務引用(通過粘貼Web服務的運行URL)在新網站中使用它時,出現以下錯誤:

"There was an error downloading 'http://localhost:3849/WebService3/WebService.asmx/_vti_bin/ListData.svc/$metadata'.
 Unable to connect to the remote server
 No connection could be made because the target machine actively refused it   127.0.0.1:3849
Metadata contains a reference that cannot be resolved:  'http://localhost:3849/WebService3/WebService.asmx'.
 There was no endpoint listening at http://localhost:3849/WebService3/WebService.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
 Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:3849
 If the service is defined in the current solution, try building the solution and adding the service reference again."

我該怎么辦?

  1. 嘗試在瀏覽器中瀏覽服務URL http:// * :3849 / WebService3 / WebService.asmx / _vti_bin / ListData.svc,並查看元數據是否可用
  2. 確保操作和返回類型的所有參數都是通用的,而不是.net特定的

暫無
暫無

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

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