I am trying to crawl the web using the following code snippet.
HttpWebRequest req = (HttpWebRequest )WebRequest.Cre ate(url);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
....
By default, the req.AllowAutoRe direct is true and
MaximumAutomati cRedirections is 50.
When I try to crawl the following URL.
I get NameResolutionF ailure exception. However, I am able to open this URL
from the browser and it gets redirected to:
How do I force my C# code to go to the redirected url?
HttpWebRequest req = (HttpWebRequest )WebRequest.Cre ate(url);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
....
By default, the req.AllowAutoRe direct is true and
MaximumAutomati cRedirections is 50.
When I try to crawl the following URL.
I get NameResolutionF ailure exception. However, I am able to open this URL
from the browser and it gets redirected to:
How do I force my C# code to go to the redirected url?
Comment