Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using GetTickets()? #288

Closed
tmenegh opened this issue Jul 6, 2017 · 11 comments
Closed

Error using GetTickets()? #288

tmenegh opened this issue Jul 6, 2017 · 11 comments

Comments

@tmenegh
Copy link

tmenegh commented Jul 6, 2017

Hello,
I've been using the API for quite some time now. I had an issue present itself on 7/4 around 5 A.M. The API is used within a webpage running on Windows Server 2003 with .NET Framework 4. I've verified communication with the server and zendesk via a cURL post but I'm still receive the error below.

The underlying connection was closed: An unexpected error occurred on a send.Error content:
Resource String: tickets/7774013.json +

The issue only occurs on the server. I am able to run it from my development machine without error. Any suggestions?

@mozts2005
Copy link
Member

Without more information, I can be sure what your issue is. I have a few ideas.

  1. Rate limit
  2. TLS

What version of the of the library are you using?
Can you share stack trace?

@wclarke99
Copy link

Hi @mozts2005 We are having the same issue, "The underlying connection was closed: An unexpected error occurred on a send". We have been running this code for 18 months without issue. file ZendeskApi_v2_35 Version 2.0.0.0

@tmenegh
Copy link
Author

tmenegh commented Jul 7, 2017

It appears to be an issue with TLS and .Net Framework 4. The issue was present when trying to run the Models.Ticket.GetTicket() function from a console application on the server. I was unable to complete any requests to our zendesk subdomain from the server using the RestSharp library written by John Sheehan as well. We have since moved to a new 2012 Web Server and all issues have been resolved.

Thank you for your time.

@mozts2005
Copy link
Member

@wclarke99 I would like to help you more. Can you provide a stack trace?

@tmenegh I am glad that you were able to fix the issue.

@wclarke99
Copy link

@mozts2005 Hi Elizabeth, below is the stack track -
Stack trace: at ZendeskApi_v2.Core.RunRequest(String resource, String requestMethod, Object body)
at ZendeskApi_v2.Core.RunRequest[T](String resource, String requestMethod, Object body)
at ZendeskApi_v2.Core.GenericGet[T](String resource)
at ZendeskApi_v2.Requests.Tickets.GetTicketForms()
at ZendeskAPIWrapper.GetTicketForms()
at ServiceRequests_2.GenerateAddNewRequestSelections()
at ServiceRequests_2.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

@mozts2005
Copy link
Member

@wclarke99 Based on my testing and I think your issue is TLS cipher suites. I would use IISCrypto to test which ones are supported on your server and by zendesk.

@mozts2005
Copy link
Member

There has not been a reply in over a week. I am closing this issue

@seagulledge
Copy link

I had this same problem with an .Net 4.52 application. The underlying network calls use TLS 1.0 as the default. The fix was to add before the API call:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

Note: .Net 4.6 or higher uses TLS 1.2 as the default

@ghost
Copy link

ghost commented Jun 21, 2018

I also had this problem and @seagulledge 's solution has worked perfectly! Thank you :)

@ShriN
Copy link

ShriN commented Jun 27, 2018

Thanks @seagulledge! Your solution worked perfectly.

@QuentinDosSantos
Copy link

Thank you so much @seagulledge !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants