Dear Sir/Madam
I made one user control using C#(.NET Runtime is 1.1). It is embeded in Internet Explorer
Basically, this control is very similiar to FTP client program. So it should be connecte
to FTP server.
First of all, I have granted full trust for security. So it is not related with an
security reason at all
I tried to make code to connect to FTP server in the control
However, it always takes exactly 100s to establish connection with the server
It is so long long long time, isn't it?.. Once I made one connection, next connectio
is established immediately. I really don't know why it always exactly takes 100s whe
connection is established first-time.
Of course, if I tested this same code in the normal windows form, there is no performance
problem at all..In other words, the connection is established immediately
If you have any ideas, please please let know why, and how I can work around this problem
Here is some code.
Start method is called to make connection to the FTP Server
public void Start()
AsyncCallback callback = new AsyncCallback(ConnectionEstablished)
this.BeginLogin(callback)
private delegate void LoginCallback()
public System.IAsyncResult BeginLogin( System.AsyncCallback callback
LoginCallback ftpCallback = new LoginCallback(this.Login)
return ftpCallback.BeginInvoke(callback, null)
private void OpenConnection(IAsyncResult result
if(result.IsCompleted)
MessageBox.Show("Connection is established!")
}
private void Login()
...
..
ftp.Connect("serveraddress","port","uname","passwo rd")
String currentDir = ftp.GetCurrentDirectory()
..
..