G
Guest
I am trying to crawl the web using the following code snippet.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
....
By default, the req.AllowAutoRedirect is true and
MaximumAutomaticRedirections is 50.
When I try to crawl the following URL.
http://citeseer.ist.psu.edu/rd/5581...cs343zSzpszSzpathprof.pdf/ball96efficient.pdf
I get NameResolutionFailure exception. However, I am able to open this URL
from the browser and it gets redirected to:
http://citeseer.ist.psu.edu/cache/p...cs343zSzpszSzpathprof.pdf/ball96efficient.pdf
How do I force my C# code to go to the redirected url?
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)";
....
By default, the req.AllowAutoRedirect is true and
MaximumAutomaticRedirections is 50.
When I try to crawl the following URL.
http://citeseer.ist.psu.edu/rd/5581...cs343zSzpszSzpathprof.pdf/ball96efficient.pdf
I get NameResolutionFailure exception. However, I am able to open this URL
from the browser and it gets redirected to:
http://citeseer.ist.psu.edu/cache/p...cs343zSzpszSzpathprof.pdf/ball96efficient.pdf
How do I force my C# code to go to the redirected url?