【问题标题】:Cannot correctly publish a Wcf service on localhost无法在 localhost 上正确发布 Wcf 服务
【发布时间】:2015-09-29 08:19:31
【问题描述】:

我正在尝试在本地发布 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 服务并将其用于具有服务参考的其他项目?

【问题讨论】:

  • 点击“详细信息”并研究错误。
  • 现在我将它添加到问题中。
  • 错误提示“无法连接到远程服务器”。请检查部署是否按预期进行。
  • 但问题是我已经正确配置了Web服务,我只是完成了“发布”。
  • 你的结果不一样,消息说没有服务器在那个端口监听。您是如何“发布到 IIS Express”的?

标签: visual-studio web-services wcf iis


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-06
    • 1970-01-01
    相关资源
    最近更新 更多