May 21, 2011 at 3:09 PM
Edited May 21, 2011 at 3:17 PM
I still have problems with the x-user-defined encoding. Actually, i used the solution that you suggested but it seems to have adverse effects while loading a web document i.e we will not get the benefits of using WebDocument.Load() method (like detecting
Currently i use the following code to load a url: http://en.wikipedia.org/wiki/Software_development_process.com
Dim request As Net.HttpWebRequest = DirectCast(Net.WebRequest.Create(path), Net.HttpWebRequest)
Dim response As Net.HttpWebResponse = DirectCast(request.GetResponse(), Net.HttpWebResponse)
fs = New StreamReader(response.GetResponseStream)
fileContents = fs.ReadToEnd
Dim objHtmlDocument As New HtmlDocument
But with this approach, i get a WebException with status code 403:Forbidden for the specified url.
Now, if we load the same URL using a WebDocument.Load() then we get the following resultant HtmlDocument object:
Can you suggest how to solve this issue?