错误:使用WCF客户端访问另一台计算机上的服务时无法从http://172.16.70.125:8080/获取元数据
我是 WCF 的新手。事情是这样的:我有两个系统,一个运行 wcf 服务,另一个运行客户端。 我能够 ping 通该服务的 IP,并且当我将其放入浏览器时也能够看到该链接。 (它显示服务已启动并正在运行)。 但是,当我尝试从 cmd 运行 wcftestclient 时,它给出了此错误:
错误:无法从 http:// 获取元数据172.16.70.125:8080/Service 如果这是您有权访问的 Windows (R) Communication Foundation 服务,...
我一整天都在尝试此操作,它说的是同样的事情。 有人可以让我知道出了什么问题以及如何解决这个问题吗?
谢谢, 托塔提利
I'm a newbie to WCF. So here's the thing : I have two systems, one running the wcf service and the other running the client.
I'm able to ping the IP of the service, and also able to see the link when I put it into my browser. (It shows me the service is up and running).
Howver, when I try to run wcftestclient from cmd, it gives me this error :
Error: Cannot obtain Metadata from http://172.16.70.125:8080/Service If this is a Windows (R) Communication Foundation service to which you have access, ...
I've been trying this all day, and its says the same thing.
Could someone please let me know what's wrong and how to fix this?
Thanks,
Thothathri
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
WcfTestClient 实用程序取决于可用于该服务的 WSDL。 WSDL 由元数据交换(或“mex”)端点提供。您可能错过了那个端点。在您的配置中查找类似的内容,如果缺少则添加它:
The WcfTestClient utility depends on the WSDL being available for the service. The WSDL is provided by the Metadata Exchange (or 'mex') endpoint. You are probably missing that endpoint. Look for something like this in your config, or add it if it is missing:
您的服务是否公开了元数据端点?仅包含配置的相关部分
Has your service exposed a metadata endpoint? Only relevent portions of config included
您的服务是否启用了元数据交换?您的服务应该为元数据提供 mex 端点,以便 WcfTestClient 正常工作。
MSDN:如何:使用配置文件发布服务的元数据
Do you have metadata exchange enabled on your service? Your service should provide a mex endpoint for metadata in order for WcfTestClient to work AFAIK.
MSDN: How to: Publish Metadata for a Service Using a Configuration File