【发布时间】:2016-05-19 18:39:04
【问题描述】:
我正在尝试将示例项目中的 Web 服务引用添加到我当前的 VS 2015 C# 项目中。这就是我在示例项目中的内容:
要将其移至我的新项目,我尝试通过右键单击我的项目并选择“添加服务参考”来将“地址”字段复制并粘贴到我的项目中。当我这样做时,我收到以下错误:
There was an error downloading 'http://myserver.com/MyServiceExample.svc?wsdl/$metadata'.
The remote name could not be resolved: 'myserver.com'
Metadata contains a reference that cannot be resolved: 'http://myserver.com/MyServiceExample.svc?wsdl/$metadata'.
There was no endpoint listening at 'http://myserver.com/MyServiceExample.svc?wsdl/$metadata that could accept the message.
This is often caused by an incorrect address or SOAP action.
See InnerException, if present, for more details.
The remote name could not be resolved: 'myserver.com'
If the service is defined in the current solution, try building the solution and adding the service reference again.
如何才能将此服务引用添加到我的项目中?我已经尝试使用带有WSDL /verbose 命令的VS 2015 CMD Prompt 添加它,但这似乎不起作用。我有示例的项目文件和 wsdl 文件,但我无法让它们在我的解决方案中工作。
【问题讨论】:
标签: c# web-services soap service