| Dart Home | PowerTCP Telnet for .NET | Custom Development | Reply | PowerTCP Telnet for .NET Topics | Forums |
| Author | Forum: PowerTCP Telnet for .NET Topic: Telnet.Connect Exceptions |
| kejohnson From: Ulysses, KS USA Posts: 2 Member Since: 06/05/09 |
posted June 5, 2009 6:23 PM I have developed some code to provision telephony equipment. I just purchased this product, but seem to have an issue with the connect method. In my program I monitor the StateChanged event and set a boolean variable that determines if there is an active connection. Based upon that variable, I determine to send a command, try a redundant host or fail. Equipment that has redundant connections will initially connect, but immediatly disconnect if it is not the active device. When I use the Telnet.login (usename, password, prompt) method, this routine works 100% of the time. A lot of the equipment we provision has customized login prompts, so I have to use the Telnet.Login(userPrompt, username, passPrompt, password, prompt) method instead. When I use this method, if will call the StateChanged event one time, but not on other attempts. For example, in my code I will attempt to connect 5 times before switching to a redundant host. If I use the method that accepts custom username & password prompts, it will throw the event the first time it attempt connects, then again for the disconnection. The next time it will throw the event for the connection, but not the disconnection. This leaves the variable set that a connection is active, but it is not. Is there a difference in these two forms of the Telnet.Login methods in regards to the event handlers? I can post sample code, but did not know if that would help. |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted June 9, 2009 5:05 PM Hi, Under what circumstances is the event not firing? Is the server timing out on the initial connection? I tried using the included client sample using the Telnet.Login(userPrompt, username, passPrompt, password, prompt) overload and everytime I connected or disconnected to any server the event was fired after connecting and also after disconnecting. |
| kejohnson From: Ulysses, KS USA Posts: 2 Member Since: 06/05/09 |
posted June 15, 2009 4:01 PM I have reworked the code and as usual, I think it was a programmer error. It was actually failing in both scenerios, but using the standard prompts, it waited for the timeout period and gave the impression of working correctly. Suprisingly, once I wrote my code correctly, it seemed to work. Sorry if I wasted your time and I appreciate the response. |
| Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted June 16, 2009 9:21 AM No problem, I'm glad to hear you resolved the issue. |
| Reply | PowerTCP Telnet for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|