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);
*This post is locked for comments
Hello All,
Actually the Code was running fine without any modification.But i don't understand why my plugin registration tool stop working/Crashing when it hit the line var a = myClient.GetData(9789);..I am using Plugin Profiler debuging method on CRM 2016 online trial.
Hi Ramakanta,
Can please share the error log details?
Thanks
Hemant Sahu
Hi,
Also check for authentication as given in below blog.
Hi,
Check below code also from Microsoft.
Hi Scott ,
Will try your approach and let you update the same.
i am getting Business Process error... while debugging my plugin registration tool stop working when ii hit the line var a = myClient.GetData(9789);
Hi
You need to stick with no client credentials so remove myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
Hope this helps
Hi Ramakanta,
Are you getting any error? Nothing else you need to do it should work make sure you have added reference properly.
Thanks
Hemant
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156