Hi,
I've a Plugin on CRM 2016 Online and I need to call a external webService (Rest).
I can test and debug my webservice with browser, Postman, VS UnitTest and other... but,
when I call my webService from my Plugin Registration Tool in debug mode, this crash!!!!
Here my code:
using (var client = new WebClient()) { client.Headers.Add(HttpRequestHeader.Accept, "application/json"); client.Headers.Add(HttpRequestHeader.ContentType, "application/json"); try { response = client.UploadString(new Uri(string.Concat(_urlString, "/PUBLISH_PHONECALL_TOCTI")), "test"); } catch (Exception ex) { //return message } }
even though the call is in try-catch steatment, plugin registration tool crash.
Is there some limitation with Online sanbox execution?
And.... on production enviroment, have I to implement some authentication?