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.