One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Sunsing
4 years agoNew member | Level 2
Dropbox API Error on Download using asp.net: Thread Was Being Aborted
I have an App I made that was working well previously, but upgrading my code to the latest editions broke my ability to download files from my App Folder in Dropbox, to my asp.net App. This is an on-going issue and I really need to find a resolve.
I get this message in ASP.NET when I attempt to download a file from Dropbox using the api.
[ThreadAbortException: Thread was being aborted.] System.Web.HttpContext.InvokeCancellableCallback(WaitCallback callback, Object state) +113 System.Web.Util.SynchronizationHelper.SafeWrapCallback(Action action) +113
I can't find any way to get around it.
I'm also wondering if I'm missing a web.config setting, and I'm not sure what the reference means in the documentation about opening up a port for dbx.
Upload works great. I'm only running into an issue on download, and the file is less than 100k
Here's my code:
Dim dbx As New DropboxClient(AccessToken)
Dim path As String = "/" & HostName & "/" & Filename
Using response = Await dbx.Files.DownloadAsync(path)
DownloadAsync is called and throws the error, so why is the thread being aborted before I even get a response?
- Greg-DB
Dropbox Staff
The output here doesn't seem to mention any Dropbox code. Do you get any other error/output/stack containing any Dropbox SDK references?
Also, can you elaborate on what you mean when you say you were "upgrading my code to the latest editions"? What specifically were you upgrading (for example, the Dropbox SDK itself, or something else), and from what version and to what version?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,945 PostsLatest Activity: 2 hours ago
If you need more help you can view your support options (expected response time for an email or 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!