| Dart Home | PowerTCP Telnet for .NET | Custom Development | Reply | PowerTCP Telnet for .NET Topics | Forums |
| Author | Forum: PowerTCP Telnet for .NET Topic: Telnet1.Connect Does Not Work Consistently |
| xplorer2k From: Oxnard, CA USA Posts: 33 Member Since: 03/27/09 |
posted April 6, 2009 5:14 PM Hi, I have 3 servers with IP address 192.xxx.xxx.32, 192.xxx.xxx.33 and 192.xxx.xxx.60, and I can only connect consistently to the first server: 192.xxx.xxx.32. I used the dos command prompt to telnet them and I can connect to all of them consistently every time. Could you please help me to figure this out? Here is my program: Sub ConnectToServerUnit() 'Show the connect dialog and begin connect if OK was pressed. If there is an error, display it Try Me.Text = APP_NAME + " [Connecting ...]" textDisplay.Clear() Telnet1.Connect(txtHost.Text, GetPort(cboPort.Text)) 'enter username, i.e. anms, tims, ivnp, etc Telnet1.ReceiveTimeout = 10000 DisplayData(Telnet1.WaitFor("TIMS login:")) Telnet1.Send(txtUsername.Text + Chr(10)) 'Enter password Telnet1.ReceiveTimeout = 10000 DisplayData(Telnet1.WaitFor("Password:")) Telnet1.Send(txtPassword.Text + Chr(10)) Catch ex As Exception ShowError(ex.Message) Telnet1.Close() Me.Text = APP_NAME + " [Not Connected]" Return End Try textDisplay.Focus() 'Receive using asynchronous technique Telnet1.ReceiveTimeout = 0 Telnet1.BeginReceive(buffer) End Sub Thanks, Xplorer2k |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted April 8, 2009 2:01 PM What is the exact error that you are receiving? Also if you are using Telnet 4.0 then the Connect Line should read: Telnet1.ServerPort = GetPort(cboPort.Text) Telnet1.Connect(txtHost.Text) instead of: Telnet1.Connect(txtHost.Text, GetPort(cboPort.Text)) |
| xplorer2k From: Oxnard, CA USA Posts: 33 Member Since: 03/27/09 |
posted April 10, 2009 1:00 PM Jason, I found the problem. It failed because the server's name was inconsistent between all 3 systems: TIMS vs tims. I changed the waitfor From "TIMS login:" To ":" and fixed the issue. Thanks, xplorer2k |
| Reply | PowerTCP Telnet for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|