How to disconnect

Jun 25, 2010 at 2:58 PM
Hi, i,m new in this forum. A simple, probably silly, question: how can i Disconnect the Connection after using the Dialer.DialAsync|DialSync command? Thank you Bracco
Jun 28, 2010 at 2:05 PM
In 1.1 you can call the GetActiveConnections method on a RasDialer instance, in 1.2 you can call RasConnection.GetActiveConnections method. There is a HangUp method on the RasConnection class for the connection instance you wish to disconnect.
Jun 28, 2010 at 2:48 PM

Thank you so much, Jeff.

Another little question: a few days ago i tried to connect to a vpn connection with the DialAsync method and the connection remained in "Connecting" state until I reboot my notebook...

The connection is one of my normally used connections so i'm sure it's correct. Did I make something wrong? Is there a way to set the timeout?

Thank you


Jun 28, 2010 at 9:40 PM

I'm guessing you probably didn't follow the SDK documentation and ensure your RasDialer instance was disposed of properly. If you press the Stop button on your IDE while debugging a connection that's in progress your connection will get stuck in a state that it can't get out of which will require a reboot to fix. That's what is mentioned on the top of the discussions forum here.

You can set the Timeout on a connection attempt, just set the Timeout property on the RasDialer you're using.