473,657 Members | 2,517 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FTP Client using C# csharp

Hi,

I am trying to develop FTP client application using c#.

Our application functinality should be like this:

1.our client uploads files,folders to our ftp server for every 20 minutes.

2.At the end of operation they will put one confirmation file (say Done.txt)
to conirm their upload operation is completed in that cycle.
3.My new FTP client application should login to that ftp server for every 5
minutes and check for

that confirmation file, if it exists then start downloading
files,folders,s ub folders they uploaded.
4.The files are large size files and these are in PDF format.

5.After downloading all the files this FTP client application should delete
all those files
folders in that ftp server and create Delete_done.txt file.

6.we are doing that confirmation file checks to to avoid any file clashes.
(while upload/download)
I developed the windows application using c#.
I used the FTP client library found in the following URL.

http://uk.builder.com/programming/wi...9240439,00.htm

but I have some problems with my ftp client application.

when I open the PDF file I downloaded using my windows application it is
giving error as below.

There was an error opening this document. The file is damaged and
could not be repaired .
I found that problem might be the transfer type.
like ascii,binary,im age etc.

The ftp client I used in the above url doesn't implement that "TYPE" ftp
command.
I tried to implement as below.

public void setBinaryMode(B oolean mode)
{

if(mode)
{
sendCommand(thi s.m_state,"TYPE B");
}
else
{
sendCommand(thi s.m_state,"TYPE A");
}
}

But still I am getting the same pdf file damage error.

Do you guys have any idea why it is giving this error.

You can download that FTP client I used using the following URL

http://techrepublic.com.com/5138-6240-5604375.html

Please help me.

Any kind of help is greatly appreciated.

Thanks
Kumar

Nov 17 '05 #1
2 13000
check out this ftp client it supports different types

http://www.enterprisedt.com/products.../overview.html
--
HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.

"Kumar" <Ku***@discussi ons.microsoft.c om> wrote in message
news:2D******** *************** ***********@mic rosoft.com...
Hi,

I am trying to develop FTP client application using c#.

Our application functinality should be like this:

1.our client uploads files,folders to our ftp server for every 20 minutes.

2.At the end of operation they will put one confirmation file (say Done.txt) to conirm their upload operation is completed in that cycle.
3.My new FTP client application should login to that ftp server for every 5 minutes and check for

that confirmation file, if it exists then start downloading
files,folders,s ub folders they uploaded.
4.The files are large size files and these are in PDF format.

5.After downloading all the files this FTP client application should delete all those files
folders in that ftp server and create Delete_done.txt file.

6.we are doing that confirmation file checks to to avoid any file clashes.
(while upload/download)
I developed the windows application using c#.
I used the FTP client library found in the following URL.

http://uk.builder.com/programming/wi...9240439,00.htm

but I have some problems with my ftp client application.

when I open the PDF file I downloaded using my windows application it is
giving error as below.

There was an error opening this document. The file is damaged and
could not be repaired .
I found that problem might be the transfer type.
like ascii,binary,im age etc.

The ftp client I used in the above url doesn't implement that "TYPE" ftp
command.
I tried to implement as below.

public void setBinaryMode(B oolean mode)
{

if(mode)
{
sendCommand(thi s.m_state,"TYPE B");
}
else
{
sendCommand(thi s.m_state,"TYPE A");
}
}

But still I am getting the same pdf file damage error.

Do you guys have any idea why it is giving this error.

You can download that FTP client I used using the following URL

http://techrepublic.com.com/5138-6240-5604375.html

Please help me.

Any kind of help is greatly appreciated.

Thanks
Kumar


Nov 17 '05 #2
"Kumar" <Ku***@discussi ons.microsoft.c om> wrote in message
news:2D******** *************** ***********@mic rosoft.com...

http://www.chilkatsoft.com/ftp-dotnet.asp
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
336
by: Tom | last post by:
I have a question.. I am using remoting but on my client side I chose to use an interface. As a result I was wondering if its still possible to place the configuration details into a xml config file ? I have not seen any examples of this does anyone know how I can do this ? All I've seen are example such as below where an interface calling the server as such. but I would like to not use this and instead call the config file as its easily...
11
2760
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each other. On my application startup, I configure the objects usting the RemotingConfiguration class to load the config file. Then I "ping" each of the objects to call their constructors. This all works fine if no one is attempting to connect at the...
3
5046
by: Ed Sutton | last post by:
How can I show the email client UI so the user can send the attachment to the desired recipient. I get an exception if I leave the MailMessage.To property blank. Is there any way to do this? I found a Microsoft example that uses mapi32.dll that can do this. But I can nopt make the SmtpMail work like I want. Thanks in advance, -Ed
0
2773
by: netgeni59 | last post by:
Hello fellow C# friends, I am trying to write a C# TCP client that was formerly written in Java. The server must still remain in Java. I cannot get text data from the C# client to be received by the Java TCP server. No matter how I try to send data from the client to the server, the Java server DataInputStream readUTF() method never returns with any data. Can someone please shed some light on this problem? Thanks.
7
1324
by: rbeyea | last post by:
I am writing a DLL (DLL1) that is wrapping another DLL (DLL2). I need to extract the information returned from DLL2 and pass it out to the Client application this is using DLL1. DLL2 returns data that I would like to return through DLL1 as a collection so the user can use foreach (lookup li in _myAdapter.lookupInfoCol) and get the li.JID and li.MailAddr1 data from the returned collection. The data is in the collection and I think it is...
3
3214
by: Poppy | last post by:
I have to write an email client in VB.net to read from Hotmail but I need to do it without 3rd party controls. Does anyone know of any good sites which might give me an overview of this subject ? Thanks in Advance
4
2256
by: Sharon | last post by:
Hi, I'm using the remoting, and I have a remoting object that has a public event that other processes should register to it. But when the client process is registering to the remote event, it throw the following exception: System.Runtime.Serialization.SerializationException {“Cannot find the assembly Tester, Version=1.0.2164.27180, Culture=neutral, PublicKeyToken=null.”}
13
28742
by: Sandeep Singh | last post by:
I am making socket client application in C# how can i get ip address of client who has connected to server
14
4441
by: Ankit Aneja | last post by:
The code of classes given below is for server to which clients connect i want to get ip address of client which has connected pls help how can i get //listen class public class listen {
12
2886
by: SAL | last post by:
Hello, Is it possible to read a CSV from the Client, and bind my Datagrid to the data in the CSV file without uploading the file to the Server first? I have tried and in Debug mode on my workstation it works fine, but when I publish the page on our DEV server it doesn't fine the CSV file from the client. Has anyone done this before? If so, how do I do it? I'm new to ASP.net so
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.