Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / March 2005

Tip: Looking for answers? Try searching our database.

issuing FTP commands (ABOR)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jportelas - 10 Mar 2005 22:47 GMT
Hi everyone:

I hope someone knows this one...

I'm programming a FTP client (in .NET 1.1) for a transferring files
application, everything works perfect when using the PASV passive mode, but
when I go on the PORT command, a STOR command starts to transfer a file but
when I close the data connection I get a "426 Connection closed; transfer
aborted." error, I've read that closing the connection should close the file
transfer and I should get a 226 response, but it doesn't seem to work. :(

By the way I close the socket using the socket.Close() method provided by
.NET.

Thanx for any help on this.
A G - 12 Mar 2005 09:48 GMT
It sounds like you are closing the connection before the whole file gets
transfered , are you checking in your code to see if the file is still being
transfered  before you close the connection something like :
while ((m_bytes = input.Read(m_buffer, 0, m_buffer.Length)) > 0)

good luck ,

Ahmed G .

> Hi everyone:
>
[quoted text clipped - 11 lines]
>
> Thanx for any help on this.
A G - 12 Mar 2005 10:18 GMT
Take a look at :

http://support.microsoft.com/default.aspx?scid=kb;en-us;832679

http://www.developer.com/net/vb/article.php/10926_3424121_2

both articles cover alot of details on ftp .

Good luck ,

Ahmed G.

> It sounds like you are closing the connection before the whole file gets
> transfered , are you checking in your code to see if the file is still
being
> transfered  before you close the connection something like :
> while ((m_bytes = input.Read(m_buffer, 0, m_buffer.Length)) > 0)
[quoted text clipped - 18 lines]
>
> Thanx for any help on this.
Jportelas - 18 Mar 2005 14:37 GMT
Hi Ahmed :

Thanks a lot for the reply.

I tried what you suggested and worked fine in some cases, I don't know why
but sometimes the listener socket seems not to be enough for the server to
connect, even if i Close it and open it everytime, it's really weird!

In fact I think my program will work only in passive mode, I also read
passive mode is the standard way to go when firewalls are involved...

Thanks for your time my friend.

Bye.

> Take a look at :
>
[quoted text clipped - 36 lines]
> >
> > Thanx for any help on this.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.