I have created a plugin which get activated when any new connection created.
And in plugin i am calling a REST api to store data in our OLD system.
But when i am calling like below
bytes = Encoding.UTF8.GetBytes(PayLoad);
- using (var client = new WebClient())
- {
- client.Headers[HttpRequestHeader.Accept] = "application/json";
- client.Headers[HttpRequestHeader.ContentType] = "application/json";
- client.Encoding = Encoding.UTF8;
- var response = client.UploadData(RestUrl, "PUT", bytes);
- return Encoding.UTF8.GetString(response);
- }
But its not running and when i am debugging it comes on line 7 and when i hit F10 it getting stop and my Plugin Registration Tool also get crashed.
If it don't get crash i can get the exception but due to that i am unable to catch the cause.
Thanks,
Rahul tiwari
*This post is locked for comments