Issues with TLS/SSL (If your app stopped working Read Me First!!!) #339
-
Today the api does not work and the error 'The underlying connection was closed: An unexpected error occurred on a send' pops up when executing a simple query I also use the postman to do the same query and it still works well. Is there anything wrong with this library? |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
We are having the same issue. Same error,. Our last successful ticket via the API was 19 jun. 2018 22:35:55. |
Beta Was this translation helpful? Give feedback.
-
I am having similar issues except that I have discovered that my issues are not just with zendesk but with a bunch of my API calls |
Beta Was this translation helpful? Give feedback.
-
Zendesk is only supporting TLS 1.2 as of June 13, 2018 Options to fix this issue (in the order I would do them)
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12 | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls; note: |
Beta Was this translation helpful? Give feedback.
-
Hey Mozts, the 2nd solution works like a charm. I cannot do the 1st solution as I cannot install 4.7.x in my computer which may be caused by the existing .Net core version in my system. Anyway the 2nd does save my day. Thanks:) |
Beta Was this translation helpful? Give feedback.
-
Hi Mozts, i also used the second option. Works great. |
Beta Was this translation helpful? Give feedback.
-
Hi Mozts, |
Beta Was this translation helpful? Give feedback.
-
Hi Mozts, I am not sure if the ServicePointManager.SecurityProtocol will affect other service/connection. Could we add the setting only at this library? How about change a little bit to System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12 | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls; Use |= instead of = |
Beta Was this translation helpful? Give feedback.
-
@brandlink-james As I pointed out before Microsoft says not do so please see https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls System.Net.ServicePointManager.SecurityProtocol is a static as can be seen here If I change it in the library, this could brake calls you make to other services (say one that errors on a tls1.2 call). I have had to fix that issue for my day job. |
Beta Was this translation helpful? Give feedback.
-
Just for reference, this is breaking all the unit tests for the project at the moment. Easiest way to fix this is to add this class outside any namespace (either in new file or at the end of Settings.cs perhaps - can't be in a namespace)
@mozts2005: Want a pull request for this or add yourself (sorry, if I ask to many question. Newbe when it come to open source contributions) |
Beta Was this translation helpful? Give feedback.
Zendesk is only supporting TLS 1.2 as of June 13, 2018
Options to fix this issue (in the order I would do them)
This setting is global and may need to be different for other services.
note:
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls#support-for-tls-12