Screen Scraping Error: (501) Not Implemented

A

aferriere

Hi

I am getting a System.Net.WebException -- >The remote server returned
an error: (501) Not Implemented
when I try to read the contents from
http://www.ourcommunity.com.au/member/directory_details.do?orgId=319
Other urls which I have tried work fine.

I have tried using both WebRequest and WebClient

*****CODE USING WebRequest*******
string result;
WebResponse objResponse;
WebRequest objRequest = System.Net.HttpWebRequest.Create(url);
objResponse = objRequest.GetResponse();
//*** GetResponse() THROWS THE System.Net.WebException *****
using (StreamReader sr = new
StreamReader(objResponse.GetResponseStream()) )
{
result = sr.ReadToEnd();
// Close and clean up the StreamReader
sr.Close();
}


*****CODE USING WebClient*******
WebClient objWebClient = new WebClient();
byte[] aRequestedHTML;
aRequestedHTML = objWebClient.DownloadData(url);
//*** DownloadData() THROWS THE System.Net.WebException ****
UTF8Encoding objUTF8 = new UTF8Encoding();
string strRequestedHTML;
strRequestedHTML = objUTF8.GetString(aRequestedHTML);
result = strRequestedHTML;

Pretty much stuck here and not sure if there is any other way to get
the page content. Anyone knows of how I could bet the content from
http://www.ourcommunity.com.au/member/directory_details.do?orgId=319
Any help would be greatly appreciated
 
G

Guest

See my answer in the C# group. I actually should have answered it here.
Please don't cross and multiple post.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top