Hi,
I have a plugin calling an external web service to retrieve some data.
Just a normal web request:
webRequest = WebRequest.Create(p_Url);
webRequest.Method = WebRequestMethods.Http.Post;
webRequest.Headers[HttpRequestHeader.Authorization.ToString()] = "Bearer " + p_ApiKey;
byte[] byteArray = Encoding.UTF8.GetBytes(p_Json);
webRequest.ContentType = "application/json";
webRequest.ContentLength = byteArray.Length;
Stream dataStream = webRequest.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
string searchTokenResponse;
using (IWebResponse response = webRequest.GetResponse()) {
using (Stream dataStream = response.GetResponseStream()) {
using (StreamReader streamReader = new StreamReader(dataStream)) {
searchTokenResponse = streamReader.ReadToEnd();
}
}
}
The above code works fine in my Dynamics CRM 8.1 instance, but does not in my Dynamics CRM 8.2 instance. It fails with the error: Could not establish trust relationship for the SSL/TLS secure channel.
Any clues?
*This post is locked for comments
I have the same question (0)