473,499 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scrren Scrapping Error: 501 Not Implemented

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 url:http://
http://www.ourcommunity.com.au/membe...s.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);
objRequest.Proxy=WebProxy.GetDefaultProxy(); //*** THROWS THE
System.Net.WebException
objResponse = objRequest.GetResponse();
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); //*** 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/membe...s.do?orgId=319
Any help would br greatly appreciated

Feb 13 '07 #1
2 5512
WebClient objWebClient = new WebClient();
objWebClient.Headers.Add("User-Agent", "Mozilla/4.0+");

Cheers.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"aferriere" wrote:
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 url:http://
http://www.ourcommunity.com.au/membe...s.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);
objRequest.Proxy=WebProxy.GetDefaultProxy(); //*** THROWS THE
System.Net.WebException
objResponse = objRequest.GetResponse();
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); //*** 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/membe...s.do?orgId=319
Any help would br greatly appreciated

Feb 13 '07 #2
Thanks

This worked just fine

Andrew
Feb 14 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5006
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
2
2935
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to...
2
4428
by: Artur | last post by:
Hi Newsgroup, im currently working on programming a asp.net application consuming an Webservice hosted on Apache/Axis. I have generated WSDL and Proxy classes from VisualStudio.net. But when...
6
3110
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
669
25378
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
1
3354
by: girays | last post by:
I have a template class which name is EntityRepository and when I compile this class I get no error. But when I use this class in a main method I get LNK2019 linking error. std::map object is used...
1
1731
by: aferriere | last post by:
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/...
6
1554
by: atyant | last post by:
hey i want to know the funda of screen scrapping that how it is done using C#
0
1698
by: Miles | last post by:
On Mon, Sep 15, 2008 at 6:06 AM, Harish K Vishwanath <harish.shastry@gmail.comwrote: "built-in type" generally means "implemented in C", also sometimes called "extension type". Both the...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.