现在的位置: 首页 > 综合 > 正文

wcf项目实战

2013年08月28日 ⁄ 综合 ⁄ 共 816字 ⁄ 字号 评论关闭

最近在crm项目中加入了wcf服务层,以便于制作对外的客户资料查询以及呼叫中心的数据交换,主要内容如下:

 

 

1.       Client在引用或者更新wcf的时候需要host中的配置打开mex元数据,实际发布后需要进行关闭

 

2.       对于.netTcpBinding来说效率相对较快,但是不具备交互性

 

3.       对于wcf和非wcf进行通信的时候适用传输安全即可,对于netTcpBinding实例如下:

<bindings>

      <netTcpBinding>

        <binding name="netTcpBindingConfigration">

          <security mode="Transport">

            <transport clientCredentialType="Windows"  protectionLevel="EncryptAndSign"/>

          </security>

        </binding>

      </netTcpBinding>

    </bindings>

 

4.       使用nettcpbinding在客户端需要进行用户名和密码验证

client.ClientCredentials.Windows.ClientCredential.UserName = "xxxx";

client.ClientCredentials.Windows.ClientCredential.Password = "xxxx";

 

 

宿主可以使用创建一个windows服务或者

 

 

这里分享一下相关绑定安全设置,地址:

http://www.cnblogs.com/frank_xl/tag/WCF%e5%88%86%e5%b8%83%e5%bc%8f%e5%ae%89%e5%85%a8%e5%bc%80%e5%8f%91%e5%ae%9e%e8%b7%b5/

 

抱歉!评论已关闭.