Hello,
I got it working. In case anyone is interested, here is the code:
-----------------------------------------------------------------------
string path = System.Web.HttpContext.Current.Request.Url.AbsoluteUri;//.FilePath;
HttpWebRequest loHttp = (HttpWebRequest) WebRequest.Create(path);
loHttp.Timeout = 10000; // 10 secs
loHttp.UserAgent = "Code Sample Web Client";
loHttp.CookieContainer = new CookieContainer();
HttpWebResponse loWebResponse = (HttpWebResponse) loHttp.GetResponse();
Encoding enc = Encoding.GetEncoding(1252); // Windows-1252 or iso-
if (loWebResponse.ContentEncoding.Length > 0)
{
enc = Encoding.GetEncoding(loWebResponse.ContentEncoding);
}
StreamReader loResponseStream =
new StreamReader(loWebResponse.GetResponseStream(),enc);
string html = loResponseStream.ReadToEnd();
loResponseStream.Close();
loWebResponse.Close();