ShowDialingProgress option not working

Feb 8, 2010 at 2:58 AM
Edited Feb 8, 2010 at 3:07 AM

Hi

I have a direct cable connection to some custom hardware and I am using the following code to create a connection:

 

Dim entry As RasEntry = RasEntry.CreateVpnEntry(mConnectionName, mServerIPAddr, RasVpnStrategy.Default, RasDevice.GetDeviceByName(mDeviceName, RasDeviceType.Modem))
If Not ConnectionExists(entry.Name) Then
    entry.IPAddress = IPAddress.Parse(mLocalIPAddr)
    entry.Options = RasEntryOptions.SpecificIPAddress + RasEntryOptions.RemoteDefaultGateway
    If mShowNotification Then entry.Options += RasEntryOptions.ModemLights
    If mDisplayConnProgress Then entry.Options += RasEntryOptions.ShowDialingProgress
    entry.FramingProtocol = RasFramingProtocol.Ppp
    entry.RedialCount = mRedialAttempts
    entry.RedialPause = mRedialPause
    publicPhonebook.Entries.Add(entry)
End If

 

Dim entry As RasEntry = RasEntry.CreateVpnEntry(mConnectionName, mServerIPAddr, RasVpnStrategy.Default, RasDevice.GetDeviceByName(mDeviceName, RasDeviceType.Modem))

If Not ConnectionExists(entry.Name) Then

    entry.IPAddress = IPAddress.Parse(mLocalIPAddr)

    entry.Options = RasEntryOptions.SpecificIPAddress + RasEntryOptions.RemoteDefaultGateway

    If mShowNotification Then entry.Options += RasEntryOptions.ModemLights

    If mDisplayConnProgress Then entry.Options += RasEntryOptions.ShowDialingProgress

    entry.FramingProtocol = RasFramingProtocol.Ppp

    entry.RedialCount = mRedialAttempts

    entry.RedialPause = mRedialPause

    publicPhonebook.Entries.Add(entry)

End If

 

 

This code creates the connection exactly as I want with all the correct settings. When I connect manually via the Network Connections window, everything works perfectly, the dialing progress window pops up, it redials if a failure occurs, and the icon appears in the system tray, exactly what I want.

However, if I connect programmatically using RasDialer, the Dialing Progress window does not show, and it does not attempt to redial on failure. The system tray icon appears ok.

Any ideas?

 

I am using the following code to dial the connection:

dialer.EntryName = mConnectionName

dialer.PhoneBookPath = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.AllUsers)

dialer.Timeout = mConnectionTimeout

AddHandler dialer.DialCompleted, AddressOf HandleDialComplete

AddHandler dialer.StateChanged, AddressOf HandleStateChanged

dialer.DialAsync()

Coordinator
Feb 8, 2010 at 1:39 PM

That's because the RasDialer cannot show a user interface. I believe you need to look at using the RasDialDialog component to dial your connection.

Feb 8, 2010 at 8:43 PM

Just tried that and, yes, it works.

Thanks