Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0
Hi experts,
I'm trying to capture text from this site, but I can not.
I I can capture text from any such put, google, yahoo, ... but for this website I can not, if you test you will see that you can not.
I do not give any error, just returns me empty the string

WebRequest request = WebRequest.Create("");
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
TextoWeb = reader.ReadToEnd();
They have to have some code to reject requests for code, but if you access the web browser, I can access without problems
Posted 15-Jan-13 4:50am
Sergey Alexandrovich Kryukov at 15-Jan-13 11:55am
Will spelling "football" help you? :-)
Jason Gleim at 15-Jan-13 12:10pm
It isn't likely there is anything to block to HTML returned by the site when you try to get it from a web client versus a browser. I suggest starting with Fiddler. Download it, follow the directions on intercepting the web request, and see what the server is returning. Right now you don't know what is wrong... if you are behind a proxy, that could be it... or there could be something else causing problems... Start with Fiddler to see the traffic and figure out if the request is even going out and actually coming back to you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web01 | 2.8.150302.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100