1
Vote

DialCompletedEventArgs,RasConnectionEventArgs,StateChangedEventArgs Does not work Properly on Win10

description

All the event hadlers like DialCompletedEventArgs,RasConnectionEventArgs,StateChangedEventArgs are not working proprly in Win10 Machine.

Event(Connected,Disconnected,Error) is capturing some times only, meaning some times works some times does not.

Plz Assist Me.

public VPNHelper()
    {

        dialer.DialCompleted += new EventHandler<DialCompletedEventArgs>(Dialer_DialCompleted);
    }
public void Dialer_DialCompleted(object sender, DialCompletedEventArgs e)
    {
if (e.Connected)
        {
            Console.WriteLine("\n" + Convert.ToString(DateTime.Now) + ": " + VPNName + " Connection successful!");
}


I am Using ManualResetEvent to finish the Task First.


while (!CheckStatus)
            {


                ManResEvnt.WaitOne();

            }

comments

rajaraman990 wrote Oct 25, 2016 at 7:29 AM

I am working on a console app which will send and receive http request and responses to check Active websites with different VPN connections automatically. when i try to capture connected/disconnected event after dialling the VPN connection it does not fire event method few times. when i try to debug using breakpiont it works like a champ. plz assist me

rajaraman990 wrote Oct 25, 2016 at 7:30 AM

...