I try to write FTP client. I wander how can I keep one session on FTP server all the time (How to log to the server, download few files, upload few files, log out).
Now when I use WebRequest.Create(uri) i log into server and list files in /. Later I want to list files in some folder, I have to use anothe WebRequest.Create(uri) and then I see on the FTP server that I have two open sessions.
What can I do to work all the time on the first one?.
I tried to change keepAlive to true/false, to use the same uri but all the time I create another session.
Now when I use WebRequest.Create(uri) i log into server and list files in /. Later I want to list files in some folder, I have to use anothe WebRequest.Create(uri) and then I see on the FTP server that I have two open sessions.
What can I do to work all the time on the first one?.
I tried to change keepAlive to true/false, to use the same uri but all the time I create another session.