407 proxy authentication required
I am trying to crawl any web site and the error i am getting is 407 proxy authentication required. public StringBuilder getOnlineHTML(string URI) { StringBuilder strbld = new StringBuilder(); // used to build entire input byte[] buf = new byte[8192]; // used on each read operation HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URI); // prepare the web page we will be asking for HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // execute the request Stream resStream = response.GetResponseStream(); // we will read data via the response stream string tempString = null; int count = 0; do { count = resStream.Read(buf, 0, buf.Length); // fill the buffer with data if (count != 0) // make sure we read some data { tempString = Encoding.ASCII.GetString(buf, 0, count); // translate from bytes to ASCII text strbld.Append(tempString); // continue building the string } } while (count > 0); // any more data to read? return strb } Please help me get out of this issue. i want to crawl a site and get the HTML code from that site.... Regards ---------------------------------- Hemant Basavapattan(MCTS) Wipro Technologies
April 29th, 2011 5:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics