Discuss Dropbox Developer & API
Hello my friends
I write simple winform application for download files from my account dropbox .
After few hour exception is raised :
Could not create ssl/tls secure channel .
I test on vps server in germany
The Dropbox API servers are being served with valid SSL/TLS configurations, and I'm not aware of any current service disruptions that may cause this. It sounds like there may an issue with your network connection or system. Here are some threads that may be helpful:
If there's an issue with the official Dropbox .NET SDK, we'll be happy to look into it, but we'll need some more information. Please reply with:
- the name and version number of the platform and SDK you are using
- the steps to reproduce the issue, including relevant code snippet(s)
- the full text of any error or unexpected output
I've encountered the same issue as you. I managed to fix it by adding the following lines of code
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
before calling the dropbox functions, e.g. in the Main() function of the application.
The error is generic and there are many reasons why the SSL/TLS negotiation may fail. ServicePointManager.SecurityProtocol property selects the version of the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocol to use for new connections; existing c# socket connections aren't changed. Make sure the ServicePointManager settings are made before the HttpWebRequest is created, else it will not work. Also, you have to enable other security protocol versions to resolve this issue:
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
SecurityProtocolType.Tls
SecurityProtocolType.Tls11
SecurityProtocolType.Ssl3;
//createing HttpWebRequest after ServicePointManager settings
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://google.com/api/")
If you create HttpWebRequest before the ServicePointManager settings it will fail and shows the error message.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!