Jimmy Engtröm
Jimmy Engtröm

Reputation: 2008

How do I implement support for ftp in WP7?

Hi
I would like to retrieve documents from an ftp in my Windows phone 7 application (built with XNA in my case).
As far as I understand WP7 does not support ftp due to port and protocol(?) contraints. Is there any way to get ftp support working?
I guess I will be able to implement it my self once socket support is added but I dopn't wan't to wait for that.

Cheers
/Jimmy

Upvotes: 3

Views: 2418

Answers (5)

nzmike
nzmike

Reputation: 578

I'm trying to do the same but so far the only way I've found around it is to create a web service to run on my own server which retrieves the FTP files on behalf on the phone.

Wish MS would hurry up and give us sockets - calling a web service is fine but I'm pretty sure it would be slower than directly getting the FTP files from the phone itself.

Upvotes: 0

James
James

Reputation: 2058

If this is for development purposes, you can get access to the phones storage and copy in files by using Microsoft's SmartDevices API.

Upvotes: 0

ctacke
ctacke

Reputation: 67178

Since there are no supported socket capabilities in the initial release of WinPhone , you cannot directly FTP. You would have to create an "FTP Proxy" web service which your phone would call and have the service do the actual FTP and relay the files.

Upvotes: 7

Matt Lacey
Matt Lacey

Reputation: 65566

FTP and Sockets are not supported by the platform at the moment.

If you want to get remote files on to your phone you'll have to use HTTP(S).
You can do this either with the HttpWebRequest or WebClient classes depending on your specific needs.

Upvotes: 3

The Archetypal Paul
The Archetypal Paul

Reputation: 41769

Do you want to retrieve files fromn the phone, and over the cellular network? If so you need to confirm your operator allows ftp connections to your phone, which they probably do not.

If you're connecting over wifi, you've got more chance of this working.

Otherwise, you could implement a dropbox-style approach where the phone and your file-retrieving application both connect to a remote server

Upvotes: 0

Related Questions