Notifications
Announcements
No record found.
I have a wcf service hosted on hostgator and i want to call that from workflow or plugin registered in plugin registration tool.And i am working with dynamics crm online.
Is this possible?if yes then give me the solution or reference link else please suggest me any alternative solution
*This post is locked for comments
Hi Chhaya,
Yes, you can consuming web service from custom workflow activity or plugin.
There are 2 ways to do that in CRM Online.
1. You can host your web service in Azure server and then consume it via BasicHttpBinding.
2. If you host your service at your server, you have to consume it via IP of your server (also using BasicHttpBinding)
Regards,
Hi Pham Hong Nghiep,
For 2nd way can you give any reference link that how to consume via IP and BasicHttpBinding
You can download this sample from Microsoft at this link code.msdn.microsoft.com/How-to-call-External-WCF-42c4490d
Just correct to use your IP.
Also you should be to connect custom web services only if they are deployed on standard secured port 80 or 443. You can consume it in a standard way like in .net applications.
Thanks
Hi,
When I am trying code.msdn.microsoft.com/How-to-call-External-WCF-42c4490d i get below error.
Additional information: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Below is my code.
BasicHttpBinding myBinding = new BasicHttpBinding(); myBinding.Name = "BasicHttpBinding_PAWebIService"; 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("192.168.1.126/PAWebService.svc"); ChannelFactory<PAPlugin.ServiceReference1.PAWebIServiceClient> factory = new ChannelFactory<PAPlugin.ServiceReference1.PAWebIServiceClient>(myBinding, endPointAddress); PAPlugin.ServiceReference1.PurchaseAssistantLicenseWebIService channel = factory.CreateChannel(); var ans = channel.IsValidByDomainName(domainname, "2");
Please suggest what is the error of?
Plugin registered in CRM online runs into isolation mode "sandbox". Sandbox isolation mode has some limitations in web access to external resources.
Please check WEB ACCESS section in below link-
msdn.microsoft.com/.../gg334752.aspx
In CRM Online, you cannot access wcf service methods directly through IP address, you would need to assign a web address(URL) to the service and that web address will be used as pointer for your web service in plugin.
Best Regards,
Abhishek
Hi Abhishek, When I am debug with plugin then at the stage of calling function of service with DNS name instead of IP then each time "Plugin Registration Tool has stop Working" is displayed and pluginregistration tool closed.what to do?
Stopped at below line:
var ans = channel.IsValidByDomainName(domainname, "2");
Did you find the solution, even I am facing the same issue.
You can check here how we can call WCF service in plugin or workflow-
http://msdynamiccrmcustomizations.blogspot.com/2018/07/call-external-wcf-service-from-custom.html
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2