the code below is working on localhost but failing from the server.
environment: .NET Framework 4.5 hosted on IIS 8.5 Windows Server core 2012 (AWS)
//using System.Net;
//using RestSharp;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
ServicePointManager.Expect100Continue = true;
restClient = new RestClient("https://restapi.myapi.com/api/");
var request = new RestRequest("emailconfirmation/{id}", Method.GET);
request.AddParameter(new Parameter
{
Name = "id",
Value = key,
Type = ParameterType.UrlSegment
});
return restClient.Execute(request);