WCF分布式开发常见错误(21)

WCF分布式开发常见错误(21):unable to open its IChannelListener.分发器未能打开侦听器

我在进行WCF基于 UserName 和 Passoword的安全验证编程的时候遇到这个 错误:

The ChannelDispatcher at 'http://localhost:8001/WCFService' with contract(s) '"IWCFService"' is unable to open its IChannelListener.  'http://localhost:8001/WCFService' with contract(s) '"IWCFService的 通道分发器未能通道打开侦听器。WCF安全问题一直困扰很多人,相信很多WCF学 习者也对此非常头疼。这个错误我尝试了很久都没有解决。后来我把此问题发到 WCF英文论坛,有个老外Rodrigo回答了我问题,但是没有直接答案,算是给了我 一个提示。因为之前我猜测WCF安全模式里可以不适用证书。因为WSE3.0里我记 得就不需要使用。他告诉了WCF安全强制要求提供证书【1】原问题地址: http://social.microsoft.com/Forums/zh-CN/wcf/threads:

I have a question for WCF UserName and Passoword Validation.

I use Message security mode,but and NetTcpBinding,Console Selfhost.

But when I run the host application,Then throwed an exception:

The ChannelDispatcher at 'net.tcp://localhost:9001/WCFService' with contract(s) '"IWCFService"' is unable to open its IChannelListener.

I have try to solve it myself,But ,all methods are helpless,When I remove the codes in the config file it is ok :

<binding  name="MessageAndUserName"   >

          <security mode="Message">
            <message algorithmSuite="Basic256" clientCredentialType="UserName"/>
          </security>
        </binding>

is there anyone can give some tips?

Thanks a lot

错误截图:

-----------------------------------------------------------------

【2】原因:

因为这里WCF服务使用的安全模型为:Message。WCF要求消息安全必须提供证 书支持。而配置文件里没有设置。所以才出现这个错误。

我搜索的此错误的很多帖子,基本问题和解决方法都不清晰,导致这个问题 的原因很多。我最后把这个问题发到WCF的英文论坛,期待能有帮助的答案出现 。

时间: 2024-08-01 22:00:06

WCF分布式开发常见错误(21)的相关文章

WCF分布式开发常见错误

WCF分布式开发常见错误(30) WCF分布式开发常见错误(29) WCF分布式开发常见错误(28) WCF分布式开发常见错误(27) WCF分布式开发常见错误(26) WCF分布式开发常见错误(25) WCF分布式开发常见错误(24) WCF分布式开发常见错误(23) WCF分布式开发常见错误(22) WCF分布式开发常见错误(21) WCF分布式开发常见错误(20):TimeoutException was unhandled WCF分布式开发常见错误(19) WCF分布式开发常见错误(18

WCF分布式开发常见错误(22)

WCF分布式开发常见错误(22):The caller was not authenticated...如何在XP系统为WCF设置可信任的证书 我在XP 专业版系统进行WCF安全编程的时候,遇到的错误.使用的安全验证 方式是: UserName and Password Security 绑定协议:.WSHTTPBinding.我 会把如何在XP环境下设置可信证书的过程,详细的描述出来.因为这个错误就是 和证书有直接关系,对于很多XP环境下进行WCF编程的学习者来说,应该有不错 的参考价值.错误

WCF分布式开发常见错误(19)

WCF分布式开发常见错误(19):There was an error opening the queue打开消息队列出错 在调试托管宿主 WCF MSMQ消息队列代码的时候出现错误: There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exc

WCF分布式开发常见错误(15)

WCF分布式开发常见错误(15):Communication with the underlying transaction manager has failed 今天本地调试WCF事务的时候出现这个错误:Communication with the underlying transaction manager has failed. 搜索了很多资料,查找原因.是因为MSDTC的问题.此协议要使用分布式事务协调器. 或者是事务协议的问题. 解决办法: 修改事务通信协议. <bindings>

WCF分布式开发常见错误(13)

WCF分布式开发常见错误(13):The transaction under which this method call was executing ,此方法调用的事务被异步中断 今天WCF事务编程的时候遇到这个错误:The transaction under which this method call was executing was asynchronously aborted.此方法调用的事务被异步中断. 错误截图如下: 原因可能由多个.我查询了很多资料.国内论坛很少有人讨论这个问题

WCF分布式开发常见错误解决(12)

WCF分布式开发常见错误解决(12):The server was unable to process the request,服务无法处理请求 进行WCF编程过程中会遇到这样的错误:服务无法处理的请求由于内部错误. 具体信息如下: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeEx

WCF分布式开发常见错误解决(11)

WCF分布式开发常见错误解决(11):There is already a listener on IP endpoint ,IP 终结点 已经存在侦听器 进行WCF服务终结点配置的过程中,当你配置服务终结点端口,启动服务程序的时候会遇到如下错误,服务无法启动,1.错误信息如下: IP终结点(端口) 0.0.0.0:8002已经存在一个侦听器,请确保程序中没有多次使用一个终结点,或别的程序没有监听此终结点(端口) There is already a listener on IP endpoin

WCF分布式开发常见错误解决(10)

WCF分布式开发常见错误解决(10):套接字连接中断,The socket connection was aborted (使用Windows Service作为宿主的时候也会出现这样的情况,搜索的) 我们这里是自定义托管宿主,在进行WCF编程开发过程时,使用NetTcpBinding绑定协议,作为通讯协议,可能会引发这样的异常,导致数据如法传输.套接字连接中断,可能是由于消息处理错误,或者远程宿主接受超时引起,或者是底层网络资源问题导致,本地套接字时间是'00:00:59.7656250'.具

WCF分布式开发常见错误解决(9)

WCF分布式开发常见错误解决(9):无终结点监听,There was no endpoint listening at 当我们添加服务元数据地址,查找元数据服务,进行反序列操作.会出现这样的错误:无终结点监听Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9004/mex'. There was no endpoint listening at net.tcp://localhost:9004