lock (lockVar)
{
if (done)
return;
if (linksvisited.Contains(webBrowser1.Url.OriginalString))
return;
System.Console.WriteLine("Locked: " + webBrowser1.Url.OriginalString);
linksvisited.Add(webBrowser1.Url.OriginalString);
}
webBrowser1.Navigate(nextLink, null, null, "User-Agent: Googlebot/2.1 (+http://www.google.com/bot.html)");
I am using the following code to iterate through a page, but sometimes the webbrowser control will just stop and it won't go to the next page. No exceptions no anything it will just stop, but there is definitely another link it can visit. I am thinking it has something to do with an internal error in the control, but how the heck to I trap it. None of my exception handler catch anything. Nothing in the output console. I have disabled scripting errors.