I have an exception handler:
Ping objPinger = new Ping();
PingReply reply = null;
sting strMsg = "";
for (int intRetry=1; intRetry<=mcintPingRetries; intRetry++) {
try{
DateTime dtNow = DateTime.Now();
string strDateTime = dtNow.ToString("yyyy-MM-dd HH:mm:ss.fff");
strMsg = string.Format("Pinged:{0} Date/Time:", strDateTime);
if (swElapsed.IsRunning != true) {
swElapsed.Start();
}
reply = objPinger.Send(strDNSNum, cintPingTimeout);
break;
} catch(PingException ex) {
}
Thread.Sleep(mcintSleepPeriod);
}
In the console I am seeing lots of:
Exception thrown: `System.Net.NetworkInformation.PingException' in System.dll
I thought having a try/catch clause would allow me to manage this myself, but I am still seeing it, I’ve searched elsewhere and this is the only place where the Ping exists.