web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

How to access Azure WCF Endpoint with CRM plugin

Community Member Profile Picture Community Member
CRM plugin only support add service reference on run-time, which means we have to bind and generate the classes using code behind whenever we want to access it.

We can use the following sample code to create the binding in code behind.

BasicHttpBinding myBinding = new BasicHttpBinding();
myBinding.Name = "ARV.MyService";
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://eea5f8cbdbc749b0bcea2b6250cbae11.cloudapp.net/Myservice.svc");
MyServiceClient client = new MyServiceClient(myBinding, endPointAddress);
client.sendSMS();

This was originally posted here.

Comments

*This post is locked for comments