473,326 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Always takes 100s to establish connection...why??

TJ
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()
..
..
Jul 21 '05 #1
0 1520

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Miran Kopmajer | last post by:
I have Oracle JDeveloper10g installed on my computer and connection to Oracle AS works fine but connection to database returns Io exception: The Network Adapter could not establish the connection...
4
by: gaffar | last post by:
Sir, I am developing an application in vb.net and the backend database is ms-access. i have created ms-access databse and tables and assigned primary keys to the tables through the vb.net...
1
by: TJ | last post by:
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...
3
by: Randy | last post by:
Hello, I've got a Windows client app which hits a web service. The web service works fine unless I'm outside the firewall using a VPN connection. I know my VPN connection is working fine because I...
3
by: Bill | last post by:
I'm running a C#.Net application that is using the HttpWebRequest to upload an xml file to a https site with FIPS complicancy turned on. On the "GetRequestStream()" method I get: "The underlying...
4
by: konsu | last post by:
hello, my client code communicates with a web service through a https connection. the code has a stub derived from SoapHttpClientProtocol. It also sets a certificate policy handler that allows...
1
by: gaffar | last post by:
Sir, I am developing an application in vb.net and the backend database is ms-access. i have created ms-access databse and tables and assigned primary keys to the tables through the vb.net...
0
by: TJ | last post by:
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...
4
by: Joel Barsotti | last post by:
I'm working on shipping rate calculator going back and forth via XML. The thing I'm confused about is that the code works, but after a few hours and I don't know how many requests, I start getting...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.