I am developing a c# .Net3.5 application.
The applications checks the signature of files using WinVerifyTrust. The problem is that on isolated networks (i.e. no Internet access but machine still has an IP address) it takes a very long time (~20 seconds) until WinVerifyTrust returns.
Is there a way to identify this situation?
Have you tried using the
Windows API
-And how you will differentiate if the computer is connected with a slow internet connection?
Anyway you can Ping google (for example) to see if it's available. If the computer is not isolated it will be available.
To ping from C# just use System.Net.NetworkInformation.Ping
EDIT: if you need to support being behind a proxy then you should open a TcpConnection over the google port 80 and check if you can or you cannot. If you cannot open a port to google's 80 you cannot connect to WinVerifyTrust either.