FTP over Internet/GPRS Using .NETCF

T

troyblakely

I am trying to set up an application that will send files (pictures) to
a server over an internet connection. My first thought was to use FTP,
but I am up to other suggestions as well. I am using the
OpenNETCF.Net.Ftp class to handle the data transfer. I built my methods
based on the sample in the OpenNETCF vault. It works great through the
emulator or the device over active sync, but it doesn't work over the
wireless internet connection - I get the error message "A socket
operation was attempted to an unreachable host".

So I added the following code to open an internet connection before
doing anything else ftp related.

OpenNETCF.Net.ConnectionManager cm = new ConnectionManager();
cm.Connect(ConnectionMode.Synchronous);

Now I get the message "Couldn't open passive data connection, no
DataConnection IP was given"

Am I missing something?

Should I be going about this in a different way?

Thanks for your help.
 
P

Paul G. Tobey [eMVP]

Try making the data connection to the Internet manually by running IE and
connecting to the Web or something of that sort. Then run your original code
and see what you get. It's possible that the phone company won't allow you
to have an open socket for incoming connections and, therefore, passive FTP
won't work. You can easily change the mode which the FTP classes in
OpenNETCF are using and try again...

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top