无法在localhost上正确发布Wcf服务

时间:2015-09-29 08:19:31

标签: visual-studio web-services wcf iis

我正在尝试在本地发布Wcf服务(Visual Studio 2013),我已经将它发布在localhost中的地址上,但是当我尝试使用其他项目连接到它时,"添加服务参考"窗口告诉我"尝试在' http://localhost:53700/AzureWebServiceTest'。'。"时发生错误(详情)。

正确使用我的Wcf服务的唯一方法是将其添加到解决方案中,但我不认为这是正确的方法。

如果我点击"详情"我收到这条消息:

"There was an error downloading 'http://localhost:53700/AzureWebServiceTest/_vti_bin/ListData.svc/$metadata'.
Unable to connect to the remote server
Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione 127.0.0.1:53700
Metadata contains a reference that cannot be resolved: 'http://localhost:53700/AzureWebServiceTest'.
There was no endpoint listening at http://localhost:53700/AzureWebServiceTest 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
Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione 127.0.0.1:53700
If the service is defined in the current solution, try building the solution and adding the service reference again."

更新: 任何人都可以告诉我如何简单地在本地发布Wcf服务并使用服务参考在其他项目中使用它?

1 个答案:

答案 0 :(得分:0)

打开Visual Studio的另一个实例并执行该应用程序,然后使用主体实例找到具有(活动主机的)主动主机中描述的metaaddres的服务。 EtVoilà。