This project has moved and is read-only. For the latest updates, please go here.

htmlWeb.Load(url) hangs

Topics: Developer Forum
Nov 28, 2008 at 6:51 PM
I have a Web page that gets a calendar from another site and parses the Dates into a more printer friendly format.

The Code works fine on my test computer but when I upload it to my Windows 2000 Server it makes it to the htmlWeb.Load(url) line and just hangs.
I've done a test. It doesn't matter if the site is a remote URL or a local URL it won't load.

        HtmlAgilityPack.HtmlWeb htmlWeb = new HtmlAgilityPack.HtmlWeb();
        String url = "";
        HtmlAgilityPack.HtmlDocument uploadedForm = htmlWeb.Load(url); // <--- Never makes it past here.

The page doesn't time out. It just sits there loading. Like its in an infinite loop. I know it's something to do with the server but no clue what it could be. I tried adding the site to the trusted locations.

Any thoughts?


Dec 1, 2008 at 1:40 PM
I hate to ask, but have you verified the version(s) of .NET installed on the Windows 2k server?
Dec 1, 2008 at 4:28 PM
That's alright.
The server is: 2.0.50727
And I've set my project Build to Targeted Framework: 2.0
I originally had its default of 3.0 but when I first uploaded the site the Server died as it couldn't find assemblies. But I changed that long before I created the page in question.

I feel as though I'm missing a security setting somewhere?

I'm fairly Certain It dies on this Line:
req = WebRequest.Create(uri) as HttpWebRequest;

private HttpStatusCode Get(Uri uri, string method, string path, HtmlDocument doc)

This is my Web.config file:

<?xml version="1.0"?>
        <sessionState timeout="60" />
  <customErrors mode="Off" />
  <compilation debug="true" defaultLanguage="c#">
    <add assembly="System.DirectoryServices, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
         <authentication mode="Windows"/>

Thanks Again,