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 = "http://google.ca";
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.
I hate to ask, but have you verified the version(s) of .NET installed on the Windows 2k server?
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:
<sessionState timeout="60" />
<customErrors mode="Off" />
<compilation debug="true" defaultLanguage="c#">
<add assembly="System.DirectoryServices, Version=184.108.40.206, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />