I think I depends on the protocol, and yes you need the path in the
server,
I know you don't have the server name, but you can replace it with the
IP in
most cases (HTTP and FTP), for those cases try the method DownloadFile
of the class System.Net.WebClient, it's very straight forward, just
pass the
two paths as parametters (the one in the server, and the local one, in
that
order).

here for the documentation:
http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfile.aspx

I think, that the old File.Copy will work for ethernet (not sure):
http://msdn.microsoft.com/en-us/library/system.io.file.copy.aspx

please note, that server's path are relative to the shared path in the
server.

[If you don't know the protocol, don't keep reading]

If you can't have that path, that's a problem, may be DownloadString
helps a lit,
it works for downloading web pages and lots of web API uses it. That's
the low
level communication basis for a web service, and something that may
help if
you are getting the files on SOAP (but try convertional ways first in
that case).

I think I'm missing the case of a database connection, (SQL sever
perhaps),
I can't help in that case, but surelly you may pass the files as raws
in a table, or
as tables in a database (yep, a table is a file).

If you need any other protocol or weird method (like p2p for instance,
I think microsoft
released something for this), there most be protocol specific third
party libs, if not...
I hope TcpClient or UdpClient fit your needs, because if not, you'll
be mocking
arround with sockets.

If you are asking, surely you don't know how to use them. so...

http://en.wikipedia.org/wiki/Internet_socket
http://msdn.microsoft.com/es-es/library/system.net.sockets.socket(VS.80).aspx

For non-internet connections, ask the service provider >_<

~theraot

Reply via email to