Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8509673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:29:56+00:00 2026-06-11T03:29:56+00:00

I have this code: private List<string> webCrawler(string url, int levels) { HtmlAgilityPack.HtmlDocument doc; HtmlWeb

  • 0

I have this code:

private List<string> webCrawler(string url, int levels)
        {
            HtmlAgilityPack.HtmlDocument doc;
            HtmlWeb hw = new HtmlWeb(); 
            List<string> webSites;
            List<string> csFiles = new List<string>();

            csFiles.Add("temp string to know that something is happening in level = " + levels.ToString());
            csFiles.Add("current site name in this level is : "+url);

            doc = hw.Load(url);
            webSites = getLinks(doc);


            if (levels == 0)
            {
                return csFiles;
            }
            else
            {
                int actual_sites = 0;
                for (int i = 0; i < webSites.Count() && i< 20; i++)                 {
                    string t = webSites[i];
                                        if ( (t.StartsWith("http://")==true) || (t.StartsWith("https://")==true) )                     {
                        actual_sites++;
                        csFiles.AddRange(webCrawler(t, levels - 1));
                        Texts(richTextBox1, "Level Number " + levels + " " + t + Environment.NewLine, Color.Red);
                    }
                }

                return csFiles;
            }


        }

And getLinks() is:

private List<string> getLinks(HtmlAgilityPack.HtmlDocument document)
        {

            List<string> mainLinks = new List<string>();
            var linkNodes = document.DocumentNode.SelectNodes("//a[@href]");
            if (linkNodes != null)
            {
                foreach (HtmlNode link in linkNodes)
                {
                    var href = link.Attributes["href"].Value;
                    mainLinks.Add(href);
                }
            }
            return mainLinks;

        }

The problem is for example i crawl into google.com so after few times its getting to the site:

http://picasa.google.co.il/intl/iw/#utm_source=iw-all-more&amp;utm_campaign=iw-pic&amp;utm_medium=et

Then im getting the exception on the line:

doc = hw.Load(url);

The error is: The remote name could not be resolved: ‘picasa.google.co.il’

The exception is:

System.Net.WebException was unhandled
  Message=The remote name could not be resolved: 'picasa.google.co.il'
  Source=System
  StackTrace:
       at System.Net.HttpWebRequest.GetResponse()
       at HtmlAgilityPack.HtmlWeb.Get(Uri uri, String method, String path, HtmlDocument doc, IWebProxy proxy, ICredentials creds) in C:\Source\htmlagilitypack\Trunk\HtmlAgilityPack\HtmlWeb.cs:line 1446
       at HtmlAgilityPack.HtmlWeb.LoadUrl(Uri uri, String method, WebProxy proxy, NetworkCredential creds) in C:\Source\htmlagilitypack\Trunk\HtmlAgilityPack\HtmlWeb.cs:line 1563
       at HtmlAgilityPack.HtmlWeb.Load(String url, String method) in C:\Source\htmlagilitypack\Trunk\HtmlAgilityPack\HtmlWeb.cs:line 1152
       at HtmlAgilityPack.HtmlWeb.Load(String url) in C:\Source\htmlagilitypack\Trunk\HtmlAgilityPack\HtmlWeb.cs:line 1107
       at GatherLinks.Form1.webCrawler(String url, Int32 levels) in D:\C-Sharp\GatherLinks\GatherLinks\GatherLinks\Form1.cs:line 79
       at GatherLinks.Form1.webCrawler(String url, Int32 levels) in D:\C-Sharp\GatherLinks\GatherLinks\GatherLinks\Form1.cs:line 108
       at GatherLinks.Form1.webCrawler(String url, Int32 levels) in D:\C-Sharp\GatherLinks\GatherLinks\GatherLinks\Form1.cs:line 108
       at GatherLinks.Form1..ctor() in D:\C-Sharp\GatherLinks\GatherLinks\GatherLinks\Form1.cs:line 31
       at GatherLinks.Program.Main() in D:\C-Sharp\GatherLinks\GatherLinks\GatherLinks\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

How can i repair/fix/resolve that ?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:29:58+00:00Added an answer on June 11, 2026 at 3:29 am

    The exception is telling you that it can’t resolve picasa.google.co.il to an IP address. You probably just need to verify that the name is correct.

    Open a command window and type:

    ping picasa.google.co.il
    

    You’ll find that your computer can’t talk to this server because there isn’t a DNS entry for it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: private void removeDuplicates(List<string> currentSites, List<string> visitedSites) { for (int i
i have this code snippet private List<string> FolderOne(string Folder) { string filena; DirectoryInfo dir
I have this code: private void test(List<string> a) { } I want to use
I have this code private void writeReport(IReport report, string reportName) { string reportString =
I have this snippet of code private Templates retrieveFromCache(String name) { TemplatesWrapper t =
I have the following code: private void _DoValidate(object sender, DoWorkEventArgs e) { this.BeginInvoke(new MethodInvoker(()
I have this code: private static void saveMetricsToCSV(String fileName, double[] metrics) { try {
I have this piece of code and it's causing NullPointerException private List<Player> playerList; private
I have a code: private void submitExec() { if (SQLiteDbWrapper.getInstance().getBookCount()==0) { Toast.makeText(this, A list
I have the following code: private lazy val keys: List[String] = obj.getKeys().asScala.toList obj.getKeys returns

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.