Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

How to consume a WCF Web service in MSCRM Online using Plugin???

$
0
0

Hello All,

I have created a simple Azure Cloud Service and i have hosted the same.I am able to consume/call the hosted service in a console application but i am succeeded calling the same web service from MSCRM Online Plugin.Below is my code which is working fine in my Console application but not in my plugin

BasicHttpBinding myBinding = new BasicHttpBinding();

myBinding.Name = "BasicHttpBinding_IService1";

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("testwcfcloudservice.cloudapp.net/Service1.svc");
CloudServiceReference.Service1Client myClient = new CloudServiceReference.Service1Client(myBinding, endPointAddress);
var a = myClient.GetData(9789);


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>