博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
WCF分布式开发常见错误(11):There is already a listener on IP endpoint ,IP 终结点 已经存在侦听器...
阅读量:6886 次
发布时间:2019-06-27

本文共 1053 字,大约阅读时间需要 3 分钟。

 进行WCF服务终结点配置的过程中,当你配置服务终结点端口,启动服务程序的时候会遇到如下错误,服务无法启动,1.错误信息如下:
  IP终结点(端口) 0.0.0.0:8002已经存在一个侦听器,请确保程序中没有多次使用一个终结点,或别的程序没有监听此终结点(端口)
There is already a listener on IP endpoint 0.0.0.0:8002.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint.
  2.原因:此端口已经被使用,即已经有程序在使用一个相同的端口所致。必须我们配置两个服务终结点使用一个终结点端口
<
endpoint 
          address
=
"
http://localhost:8002/WCFService
"
 
          binding
=
"
wsHttpBinding
"
 
          contract
=
"
WCFService.IWCFService
"
>
        
</
endpoint
>
        
<
endpoint 
          address
=
"
net.tcp://localhost:8002/WCFService
"
 
          binding
=
"
netTcpBinding
"
  bindingName
=
"
netTcpBinding
"
          
          contract
=
"
WCFService.IWCFService
"
>
        
</
endpoint
>
    运行服务程序就会出现错误。
3.解决办法:
 (1)检查机器的端口,确保此端口不是系统服务端口,或者没被其他程序使用。
(2)检查服务终结点配置信息,确保两个不同的服务使用不同的终结点端口
 此例中的修改代码改为端口8001即可:
        
<
endpoint 
          address
=
"
http://localhost:8001/WCFService
"
 
          binding
=
"
wsHttpBinding
"
 
          contract
=
"
WCFService.IWCFService
"
>
        
</
endpoint
>
 本文转自 frankxulei 51CTO博客,原文链接:http://blog.51cto.com/frankxulei/320431,如需转载请自行联系原作者
你可能感兴趣的文章
处理HP-UNIX面板灯报警及配置MP
查看>>
Java多线程和线程池
查看>>
配置docker使用overlay2存储
查看>>
邮件服务器迁移方案让企业邮箱安心“搬家”
查看>>
SCDPM常见报错解答
查看>>
OA项目笔记
查看>>
引用计数 vs. GC
查看>>
jquery实用的一些方法
查看>>
质数方阵
查看>>
jQuery $.each用法
查看>>
C语言结构体指针成员强制类型转换
查看>>
5.31 dockrer
查看>>
FreeCodeCamp----Intermediate Algorithm Scripting解法
查看>>
软件工程第二章 习题2 第4题
查看>>
《JavaScript设计模式与开发实践》读书笔记之命令模式
查看>>
hdu Problem 1242 Rescue bfs + 优先队列
查看>>
HDU-1507-Uncle Tom's Inherited Land*
查看>>
force里面的射线检测
查看>>
oracle 12.1.0.2中对象锁对系统的较大影响
查看>>
tensorboard的使用
查看>>