I am trying to implement a part of my program such that it will up/download files to/from my ftp server. The server is set up correctly; that is, I can access it from a web browser just by typing in the server address. However, when I try to access it from within my application, it throws a ConnectionException error. The port is open, firewall disabled, etc, etc. Here is the code, gotten pretty much word for word from here. My code is below. Any help would be great; I'm under a bit of a time crunch.
As you say, the server is fine. I could connect and even sign in. (You have an easily-guessed password, so I edited the user ID in your post.)
So that most likely means there's no problem with the code, but the problem is somewhere in the Android configuration. However you might get some clue from looking at the stack trace to see whether the error is thrown when trying to connect, when trying to log in, or when trying to set passive mode.
posted 5 years ago
I have also tried running that same code in a standalone application separate from the Android environment (minus the Android-specific code), with no more luck. The following is the error I get:
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads