HttpWebRequest Too many automatic redirections attempted

  • Thread starter Thread starter fhrogers
  • Start date Start date
F

fhrogers

I am trying to logon to careerbuilder and keep getting

Too many automatic redirections attempted

If I make MaximumAutomaticRedirections to big I timeout

Any suggestions?


Below is the code I use:

pageUrl = "http://www.careerbuilder.com/share/Login.asp";
string postData = "Email=" +
user + "&Passwd=" + password + "&btnUASubmit=Sign+In";


request = (HttpWebRequest)WebRequest.Create(pageUrl);
request.Timeout = 20000;
request.MaximumAutomaticRedirections = 20;

request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT
5.0)";

CookieContainer cookieContainer = new CookieContainer();
request.CookieContainer = cookieContainer;

// Find all cookies from previous requests

cookies = "";
 
I am trying to logon to careerbuilder and keep getting

Too many automatic redirections attempted

If I make MaximumAutomaticRedirections to big I timeout

Any suggestions?

Use a debugging proxy like Fiddler (www.fiddlertool.com) to peek into
the HTTP traffic and see why there are so many redirects.

Cheers,
 
Back
Top