I have a RAS connection and I need disconnect to it using C#. How I do this? Currently I'm using dotRas library to handling ras connections.
Asked
Active
Viewed 1,871 times
2 Answers
2
Using the DotRas SDK, you'd just need to get the RasConnection instance you want and call HangUp().
using System.Linq;
using DotRas;
RasConnection conn = RasConnection.GetActiveConnections().Where(o => o.EntryName == "My Entry").FirstOrDefault();
if (conn != null)
{
conn.HangUp();
}
Hope that helps!

Jeff Winn
- 804
- 8
- 14
2
Based on this documentation you should just call the RasHangUp function.

Brad Semrad
- 1,501
- 1
- 11
- 19
-
This is not a refference to do DotRas SDK buddy – Uri Abramson Jul 07 '13 at 18:09