Hi Guys,
I'm trying to figure out how many times my web request was redirected before I finally landed at the end content.
I'm creating my web request as follows:
var httpRequest = (HttpWebRequest) WebRequest.Create("some arb path");
httpRequest.AllowAutoRedirect = followRedirects;
I've had a look at the following URL http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.maximumautomaticredirections.aspx
However, I do not want to impose the limit. I actually want it to follow all redirects (not really wanting a reference to all the URL's), but just for example saying "You have been redirected X times".
I hope there's a quick way to do it as currently I'm assuming I would have to capture all 3xx codes and create a new request for each (hopefully not!).