WCF分布式开发常见错误(18):Binding validation failed 绑定协议验证失败

来源:互联网 发布:北京银行学知支行 编辑:程序博客网 时间:2024/06/05 14:44
Posted on 2009-06-16 01:02 Frank Xu Lei 阅读(1429) 评论(0)  编辑 收藏 网摘 所属分类: WCF分布式开发常见错误

    测试WCF MSMQ编程时候遇到这个错误:绑定协议验证失败,具体信息:Binding validation failed because the binding's MsmqAuthenticationMode property is set to WindowsDomain but MSMQ is installed with Active Directory integration disabled. The channel factory or service host cannot be opened.

   如图:

原因:

MSMQ验证模式设置为 WindowsDomain,但是MSMQ安装活动目录AD禁用。通道工厂或者服务宿主不能打开。

解决办法:

(1)在配置文件里添加绑定设置节点:   

<bindings>
      <netMsmqBinding>
        <binding name="msmq">
          <security mode="None">
          
          </security>
        </binding>
      </netMsmqBinding>
    </bindings>

 (2)

在服务终结点里,引用这个配置,来设置MSMQ的安全模式:

<endpoint 
          address="net.msmq://localhost/WCFMSMQService"
          binding="netMsmqBinding"        
          contract="WCFService.IWCFMSMQService" bindingConfiguration="msmq" >
        </endpoint>

   当然这些也可以通过编程来实现~


【老徐的博客】

【作者】:Frank Xu Lei

【地址】:http://www.cnblogs.com/frank_xl/archive/2009/06/16/1503943.html

 

 

原创粉丝点击