0
我正在使用Visual Studio 2012製作Web服務。我已經寫了Web服務的代碼,但是當我試圖通過添加 它作爲一個服務引用(通過粘貼Web服務的運行URL)來使用它在一個新的網站。它提供了以下錯誤: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."
我該怎麼辦?
仍然收到錯誤和元數據不可用。 – Sahil
您應該使用以?wsdl (例如, www.myservices.com/services.svc?wsdl目的是檢查元數據是否可用 – Patel
我已檢查,它說它不可用 – Sahil