Dynamic CRM 2013学习笔记(二十二)插件里调用WCF服务

 

1. 添加service:

image 

 

2.调用WCF

BasicHttpBinding myBinding = new BasicHttpBinding();
myBinding.Name = "BasicHttpBinding_IAuthService";
myBinding.Security.Mode = BasicHttpSecurityMode.None;
myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName; 
 
EndpointAddress endPointAddress = new EndpointAddress("http://xxxx/AuthService.svc");
AuthServiceClient client = new AuthServiceClient(myBinding, endPointAddress);
return client.CheckDateAuth(auth);

 

 

Dynamic CRM 2013学习笔记 系列汇总

posted @ 2014-12-28 22:26  疯吻IT  阅读(1024)  评论(0编辑  收藏  举报