473,320 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

accessing web pages and emails from c#

Is there any way that my C# application can go to a web page (or email) and
copy the information (as a picture) and display it in my application. I
want my application to self update it's graphics (based on a surf report)
without having to go to web sites directly and copy the information. Surf
reports can be sent by email as opposed to copying from the web so that is
also a possibility.

Any suggestions?

thanks,

Duncan.
Nov 15 '05 #1
4 1040
The WebClient and WebRequest classes allow you to upload and download
information using HTTP.

For email, you'd need to get a 3rd party POP3 component, or write your own
simple one using TcpClient.

-mike
MVP

"Duncan Winn" <te**@test1.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there any way that my C# application can go to a web page (or email) and copy the information (as a picture) and display it in my application. I
want my application to self update it's graphics (based on a surf report)
without having to go to web sites directly and copy the information. Surf
reports can be sent by email as opposed to copying from the web so that is
also a possibility.

Any suggestions?

thanks,

Duncan.

Nov 15 '05 #2
When try to download file info from a web addres I get the error message

"Proxy Authentication Required"

Is there any way around this?

string remoteUri = http://www.croyde-surf-cam.com/;

string fileName = "ms-banner.gif", myStringWebResource = null;

WebClient myWebClient = new WebClient();

myStringWebResource = remoteUri + fileName;

myWebClient.DownloadFile(myStringWebResource,fileN ame);
Nov 15 '05 #3
The WebProxy can deal with proxies. I'd imagine that could help (if it's a
proxy blocking you).
-mike
MVP

"Duncan Winn" <te**@test1.co.uk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
When try to download file info from a web addres I get the error message

"Proxy Authentication Required"

Is there any way around this?

string remoteUri = http://www.croyde-surf-cam.com/;

string fileName = "ms-banner.gif", myStringWebResource = null;

WebClient myWebClient = new WebClient();

myStringWebResource = remoteUri + fileName;

myWebClient.DownloadFile(myStringWebResource,fileN ame);

Nov 15 '05 #4
Hi, thanks, for all your help,

I have managed to get access to the web page (i.e. the html data) but I do
not know how to download the data?
i.e. what do I do with the web response?

So far I have.........

WebProxy proxyObject = new WebProxy(my_web_page ,true);

// Initialize the WebRequest.

WebRequest myRequest = WebRequest.Create(my_web_page);

//set proxy

myRequest.Proxy = proxyObject;

// Return the response.

WebResponse myResponse = myRequest.GetResponse();
Nov 15 '05 #5

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

Similar topics

3
by: J_J | last post by:
Hi, I have FrontPage 2003 on my XP laptop. I need to test some web pages with *.asp codes which worked perfectly well with my old Win95 computer in the past. Of course I had to install Personal...
2
by: Brian Bischof | last post by:
I've spent the past three hours struggling with this one and Googled the hell out of it. Please help! I ran IISLockdown for another problem and it trashed IIS. ASP pages wouldn't run at all. So...
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
5
by: gemel | last post by:
I have a wireless networked peer-to-peer LAN and I can access web pages on the Internet. I have a development platform for ASP and I can access all pages on this machine by using the localhost...
3
by: niju | last post by:
Hi there, I have three web pages (A,B,C). I need to prevent users accessing page B and C without accessing A. What would be the best way to achieve this rule? Many Thanks Niju
2
by: Ian | last post by:
I have a Windows 2003 server running IIS6.0 It has a number of ASP.NET sites running on it. I'm trying to instal a legacy classic ASP site, but trying to access and pages with the .asp suffix...
3
by: judy.j.miller | last post by:
Does anyone know why i can't access a form element value using dot notation in firefox, when i'm in a function. Works ok in the body. I'm trying to do this: var FarTemp = faren.temp.value; I...
3
by: tshad | last post by:
I have a page with 2 Tabbed Pages on them (TabPage1, TabPage2). I am on TabPage1 and when selecting something on the page I am displaying information on TabPage2 and then want to go to TabPage2,...
1
by: kaushalgajjar | last post by:
I have problem with a Mobile Web page in ASP.Net 2.0 Web Application.. First i made a 2 page site in normal ASP.Net Web Application that is having two pages one for login and another one for email...
2
by: brendan_gallagher_2001 | last post by:
HI I am developog an ASP.net site (using vb.net 1.1) which will be accessed by a number of different office locations, where certain users will be assigned a authoriser profile, and others will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.