RasConnection.Hangup() terminates all PPP connections.

Mar 17, 2010 at 8:11 PM
Edited Mar 17, 2010 at 8:24 PM

When using a Verizon 'AirCard' wireless internet connection (PPP) and a VPN (L2TP) connection via DotRas through the AirCard WWAN connection, calling RasConnection.Hangup() terminates the AirCard WWAN connection.  When using an Ethernet WAN connection, calling RasConnection.Hangup() is correctly *not* terminated.  When using a Windows VPN connection (Vista Business) through the AirCard to the internet, the AirCard WWAN connection is correctly *not* terminated when disconnecting the Window VPN connection.  Why would DotRas RasConnection.Hangup() terminate the PPP WWAN internet connection while disconnecting a Windows VPN connection does not?  Comparisons of the DotRas L2TP phonebook entry and the Windows VPN phonebook entry differ only in the entry names, the GUID ID's (to be expected) and the Windows VPN phonebook entry has PreviewUserPassword, ShowDialingProgress, ModemLights enabled but those three settings should not be relevant.  All other settings are identical.

Coordinator
Mar 17, 2010 at 8:22 PM

The HangUp method only has access to the specific handle associated with that connection, it wouldn't disconnect more than one connection unless:

A) You're using a loop and calling HangUp on each connections returned from GetActiveConnections without verifying the connection you're hanging up is in fact the correct connection.

B) You're calling HangUp on the wireless connection which will cause the VPN connection to disconnect the since VPN connections relies on another connection.

Your AirCard is still just another PPP connection, if you tell the connection to hang up it's going to disconnect it.

Mar 17, 2010 at 8:29 PM

Thanks.  That put me on the right track.

 

Coordinator
Mar 17, 2010 at 8:31 PM

Not a problem, happy coding!

- Jeff