S
swyck
I have an app that I need to run when users log on. However we have a
number of home users that often connect via VPN. There is no point in
running the application until the user is connected to our network.
Any thoughts as to the best way to do this?
My intial idea is that I'd start a loop. Verify connectivity to our
network using:
My.Computer.Network.Ping("servername")
That should work for both VPN and internal users. If that returns
false then the app sleeps for a few minutes, wakes and checks the
connection again. I thought I'd sleep using:
System.Threading.Thread.Sleep(300000) '5 minutes
I don't want to be pinging all day either so I thought that I'd only
try 4 or 5 times and if the connection is never established then just
close the application. If the connection is available I'd break the
loop and complete processing.
Any issues with this? Any suggestions? Thanks for any help
number of home users that often connect via VPN. There is no point in
running the application until the user is connected to our network.
Any thoughts as to the best way to do this?
My intial idea is that I'd start a loop. Verify connectivity to our
network using:
My.Computer.Network.Ping("servername")
That should work for both VPN and internal users. If that returns
false then the app sleeps for a few minutes, wakes and checks the
connection again. I thought I'd sleep using:
System.Threading.Thread.Sleep(300000) '5 minutes
I don't want to be pinging all day either so I thought that I'd only
try 4 or 5 times and if the connection is never established then just
close the application. If the connection is available I'd break the
loop and complete processing.
Any issues with this? Any suggestions? Thanks for any help