Elina Lazebnik
June 22nd, 2009, 03:18 AM
I work with C# 2.0 VC2008.
I use a number of Background Workers for open multiply FTP Connections to same FTP Server. The connections are in an Active FTP Mode.
:thumbd: When I start 2 connections together, the first one is working properly and the second stops after the connection has been established good and waits for Data ( get data only after the first connection closed ).
:thumb: When I run two applications with one FTP Session for each, I haven't any problem.
This is a part of request code :
// sPath = "ftp://user_name:user_pass@server_address:21//path")
FtpWebRequest request = (FtpWebRequest)WebRequest.Create( sPath );
request.UsePassive = false;
request.Proxy = null;
request.Method = WebRequestMethods.Ftp.GetFileSize;
this.curFTPState.FileName = Path.Combine(sPathTo, filename);
this.curFTPState.FTPMethod = WebRequestMethods.Ftp.GetFileSize;
this.curFTPState.Request = request;
// Start the asynchronous request.
IAsyncResult result = (IAsyncResult)request.BeginGetResponse(new AsyncCallback(RespCallback), curFTPState);
I use a number of Background Workers for open multiply FTP Connections to same FTP Server. The connections are in an Active FTP Mode.
:thumbd: When I start 2 connections together, the first one is working properly and the second stops after the connection has been established good and waits for Data ( get data only after the first connection closed ).
:thumb: When I run two applications with one FTP Session for each, I haven't any problem.
This is a part of request code :
// sPath = "ftp://user_name:user_pass@server_address:21//path")
FtpWebRequest request = (FtpWebRequest)WebRequest.Create( sPath );
request.UsePassive = false;
request.Proxy = null;
request.Method = WebRequestMethods.Ftp.GetFileSize;
this.curFTPState.FileName = Path.Combine(sPathTo, filename);
this.curFTPState.FTPMethod = WebRequestMethods.Ftp.GetFileSize;
this.curFTPState.Request = request;
// Start the asynchronous request.
IAsyncResult result = (IAsyncResult)request.BeginGetResponse(new AsyncCallback(RespCallback), curFTPState);