我正在使用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."
我该怎么办?
答案 0 :(得分:0)