How to transfer a file from FTP server
-
Hi, I've a FTP server, which is a Unix box, and here are some 100s of log files reside. Also, I'm trying to develope an application in C# where at one point i need these log files to be copied to the developement machine [which on the later date going to be small App Server, anyways,]. Now, my problem is these log files are going to be updated daily and I need to analyze them on daily basis. It would be awesome if I could just write a small program in C# which will just transfer these files on the developemtn machine on the back-ground. Although I think .net remoting or .net's System.net might be usefull I have no idea about that. I would really apreciate if you could tell me 2 things... 1) If it is at all possible [withought user intervention, coz path and file name convesion n everything is all fixed, and its not going to change] 2) If it is possible, I would appreciate if i could get a little push towards the right direction thanks
-
Hi, I've a FTP server, which is a Unix box, and here are some 100s of log files reside. Also, I'm trying to develope an application in C# where at one point i need these log files to be copied to the developement machine [which on the later date going to be small App Server, anyways,]. Now, my problem is these log files are going to be updated daily and I need to analyze them on daily basis. It would be awesome if I could just write a small program in C# which will just transfer these files on the developemtn machine on the back-ground. Although I think .net remoting or .net's System.net might be usefull I have no idea about that. I would really apreciate if you could tell me 2 things... 1) If it is at all possible [withought user intervention, coz path and file name convesion n everything is all fixed, and its not going to change] 2) If it is possible, I would appreciate if i could get a little push towards the right direction thanks
There is no direct support for FTP in the .NET BCL (base class library), but there is for network copying and downloading via HTTP. This means you could use Samba or Apache (or any other HTTP daemon), respectively, with much better results. FTP is insecure. It base64-encodes your passwords, which is not strong encryption (all you need to do is base64-decode it). If you want to stick with FTP, however, just search this site for "FTP" using the search box under the logo. There are several good articles on FTP using managed code (C#, VB.NET, and perhaps some Managed C++). There are also class libraries available for free and commercially, like that from Xceed[^]. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]
-
There is no direct support for FTP in the .NET BCL (base class library), but there is for network copying and downloading via HTTP. This means you could use Samba or Apache (or any other HTTP daemon), respectively, with much better results. FTP is insecure. It base64-encodes your passwords, which is not strong encryption (all you need to do is base64-decode it). If you want to stick with FTP, however, just search this site for "FTP" using the search box under the logo. There are several good articles on FTP using managed code (C#, VB.NET, and perhaps some Managed C++). There are also class libraries available for free and commercially, like that from Xceed[^]. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]
thanks, but since server is an inter-network machine I'm not too worried about the security part, and also there r few other reasons, but ayways, I would really like to stick to FTP.
-
thanks, but since server is an inter-network machine I'm not too worried about the security part, and also there r few other reasons, but ayways, I would really like to stick to FTP.
Overlooking internal security is a big mistake. Attacks can come from within, as well, and it does happen. If you want to use FTP you will either need to implement it yourself or use a free or commercial library. My other suggestions are still viable. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]