Open sarahbenjamin opened 6 years ago
duplicate of #42
I am using c# code and still seeing same issue, can someone update the sample code. or let me know what i am doing wrong ?
I am also getting this all of a sudden. The same code worked last year on v1, but it is not working on v2 and gives this same error on the same line.
Yes, I do have this in: ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
And I'm using .Net 2.6.2
My sample code:
string apiPath = "/api/v2/tickets/1";
string fdDomain = "my_domain";
string apiKey = "my_api_key";
string jsonString = String.Empty; ;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://" + fdDomain + ".freshdesk.com" + apiPath);
request.ContentType = "application/json";
request.Method = "GET";
string authInfo = apiKey + ":X";
authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
request.Headers["Authorization"] = "Basic " + authInfo;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
DataSet dsFreshdeskData = new DataSet();
try
{
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
....
DId any one found the exact solution for the issue ? i am getting response when we change .Net 4 and TLS1
Hi Exactly the same issue I have.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
This line also does not work for me. Also upgrade the .net Framework to 4.7 which didnt work.
Kindly someone post your solution here.
I am using the c# code and upon this line the connection was closed error message is thrown. What am I doing wrong?
HttpWebResponse response = (HttpWebResponse)request.GetResponse()
Using the sample code.