WCF分布式开发常见错误解决(9):无终结点监听,There was no endpoint listening at
2009-05-08 23:59
721 查看
当我们添加服务元数据地址,查找元数据服务,进行反序列操作。会出现这样的错误:无终结点监听Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9004/mex'.
There was no endpoint listening at net.tcp://localhost:9004/mex that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
If the service is defined in the current solution, try building the solution and adding the service reference again.如图所示:
可能原因:此错误是由于
1.元数据服务地址错误导致。
2.托管宿主没有启动。
解决办法:
1.配置元数据交换终结点,如<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
2.运行托管宿主;
3.输入对应的元数据交换终结点地址即可。注意例子里是http元数据交换协议,我们查询元数据服务的时候一定要注意绑定协议。
备注:skypan发现的这个错误,表示感谢,这里特定整理出来供大家参考。
4.此外如果部署IIS托管WCF服务,很可能出现这样的错误。主要是服务地址在部署以后路径导致地址错误:有网友在WCF中文论坛讨论了此问题。大家可以参考:
CSQ333: 请教在开发的时候都OK的,部署到WIN2003上后就出现错误了。
NineTyNine_LiPei:客户端调用服务的终结点地址的路径问题的测试(IIS托管WCF服务程序)
There was no endpoint listening at net.tcp://localhost:9004/mex that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
If the service is defined in the current solution, try building the solution and adding the service reference again.如图所示:
可能原因:此错误是由于
1.元数据服务地址错误导致。
2.托管宿主没有启动。
解决办法:
1.配置元数据交换终结点,如<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
2.运行托管宿主;
3.输入对应的元数据交换终结点地址即可。注意例子里是http元数据交换协议,我们查询元数据服务的时候一定要注意绑定协议。
备注:skypan发现的这个错误,表示感谢,这里特定整理出来供大家参考。
4.此外如果部署IIS托管WCF服务,很可能出现这样的错误。主要是服务地址在部署以后路径导致地址错误:有网友在WCF中文论坛讨论了此问题。大家可以参考:
CSQ333: 请教在开发的时候都OK的,部署到WIN2003上后就出现错误了。
NineTyNine_LiPei:客户端调用服务的终结点地址的路径问题的测试(IIS托管WCF服务程序)
相关文章推荐
- WCF分布式开发常见错误解决(9):无终结点监听,There was no endpoint listening at
- WCF分布式开发常见错误(11):There is already a listener on IP endpoint ,IP 终结点 已经存在侦听器
- 调用WCF错误-There was no endpoint listening
- WCF分布式开发常见错误解决(1):An error occurred while attempting to find services at...添加服务引用出错
- WCF分布式开发常见错误解决(1):An error occurred while attempting to find services at...添加服务引用出错
- WCF分布式开发常见错误解决(12):The server was unable to process the request,服务无法处理请求
- WCF分布式开发常见错误解决(7):Cannot have two operations in the same contract
- there was no endpoint listening at net.pipe://localhost/PreviewProcessingService/ReportProcessing
- WCF分布式开发常见错误解决(1):添加服务引用出错
- WCF分布式开发常见错误(20):TimeoutException was unhandled
- WCF分布式开发常见错误(12):The server was unable to process the request,服务无法处理请求
- WCF分布式开发常见错误(11):There is already a listener on IP endpoint ,IP 终结点 已经存在侦听器,
- WCF分布式开发常见错误(12):The server was unable to process the request,服务无法处理请求
- WCF分布式开发常见错误(20):TimeoutException was unhandled
- there was no endpoint listening at net.pipe://localhost/PreviewProcessingService/ReportProcessing
- WCF分布式开发常见错误(22):The caller was not authenticated...如何在XP系统为WCF设置可信任的证书
- there was no endpoint listening at net.pipe://localhost/PreviewProcessingService/ReportProcessing
- WCF分布式开发常见错误(13):The transaction under which this method call was executing ,此方法调用的事务被异步中断
- WCF分布式开发常见错误(14):无效的操作异常,At least one operation on the ...
- WCF分布式开发常见错误(27):Secure channel cannot be opened because security negotiation with the remote endpoint has failed