473,395 Members | 1,629 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,395 software developers and data experts.

Reading data from a web server

I want to set some switches in say HTML, write the data to a file and
then read this file from a vb.et program. What is the best approach? I
thought at first maybe an RSS feed would do then I thought this was an
overkill since the data was more or less just 4 strings of true or
false each!
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?

Thanks

k.
Jun 27 '08 #1
7 1129
Is something using System.Net.WebClient.DownloadFile() sufficient?

"kr*******@yahoo.co.uk" wrote:
I want to set some switches in say HTML, write the data to a file and
then read this file from a vb.et program. What is the best approach? I
thought at first maybe an RSS feed would do then I thought this was an
overkill since the data was more or less just 4 strings of true or
false each!
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?

Thanks

k.
Jun 27 '08 #2
On May 9, 2:17 pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
Is something using System.Net.WebClient.DownloadFile() sufficient?

"kronec...@yahoo.co.uk" wrote:
I want to set some switches in say HTML, write the data to a file and
then read this file from a vb.et program. What is the best approach? I
thought at first maybe an RSS feed would do then I thought this was an
overkill since the data was more or less just 4 strings of true or
false each!
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?
Thanks
k.
Sounds promising. So the file could be a text file on the server ie
test_remote.txt say from a url

http://test.com/test_remote.txt

how to get this to a local file myfile_local.txt ?

K.
Jun 27 '08 #3
There are many possibilities, to get files from a server to a client,
however from where are you accessing it.

If it is a WindowsForm or WindowsService then the webclient.download is
probably the most simple one.

If it is a Webpage then simple adding a link on your page does it.

Cor

<kr*******@yahoo.co.ukschreef in bericht
news:1f**********************************@w8g2000p rd.googlegroups.com...
On May 9, 2:17 pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
>Is something using System.Net.WebClient.DownloadFile() sufficient?

"kronec...@yahoo.co.uk" wrote:
I want to set some switches in say HTML, write the data to a file and
then read this file from a vb.et program. What is the best approach? I
thought at first maybe an RSS feed would do then I thought this was an
overkill since the data was more or less just 4 strings of true or
false each!
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?
Thanks
k.

Sounds promising. So the file could be a text file on the server ie
test_remote.txt say from a url

http://test.com/test_remote.txt

how to get this to a local file myfile_local.txt ?

K.
Jun 27 '08 #4
On May 9, 1:51 am, kronec...@yahoo.co.uk wrote:
I want to set some switches in say HTML, write the data to a file and
then read this file from a vb.et program. What is the best approach? I
thought at first maybe an RSS feed would do then I thought this was an
overkill since the data was more or less just 4 strings of true or
false each!
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?

Thanks

k.
Hi,
Take a look at System.Net.WebClient class that provides download /
upload related methods and functions both. Also My Namespace is
another choice, My.Comptuer.Network provides UploadFile, DownloadFile
that are suitable for any for including text format.

Thanks,

Onur Güzel
Jun 27 '08 #5
This should do it:

Dim wc As New System.Net.WebClient
Try
wc.DownloadFile("http://test.com/test_remote.txt", "c:\myfile_local.txt")
Catch ex As Exception
Console.Out.WriteLine("an error occurred retrieving data...")
End Try
"kr*******@yahoo.co.uk" wrote:
On May 9, 2:17 pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
Is something using System.Net.WebClient.DownloadFile() sufficient?

"kronec...@yahoo.co.uk" wrote:
I want to set some switches in say HTML, write the data to a file and
then read this file from a vb.et program. What is the best approach? I
thought at first maybe an RSS feed would do then I thought this was an
overkill since the data was more or less just 4 strings of true or
false each!
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?
Thanks
k.

Sounds promising. So the file could be a text file on the server ie
test_remote.txt say from a url

http://test.com/test_remote.txt

how to get this to a local file myfile_local.txt ?

K.
Jun 27 '08 #6
<kr*******@yahoo.co.ukschrieb:
What would be the best approach? An XML file local on the server maybe
or a text file? How to read it remotely from my computer?
In addition to the other replies:

'My.Computer.Network.DownloadFile'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jun 27 '08 #7
In addition to the other replies:

'My.Computer.Network.DownloadFile'.
In addition to this message: for versions later than 2003

:-)

Cor
Jun 27 '08 #8

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

Similar topics

9
by: javastudent | last post by:
Hi, I am implementing a server that reads for socket connections at a port, and processes the socket on a separate thread. We do not control the client implementation. Here is the scenario. ...
1
by: Boris Wilhelms | last post by:
Hello all, at first, sorry for my bad English, I’ll give my best  We have a strange problem reading Text- and VarChar-Fields. Our configuration: -Windows 2003 Server -MySQL Server 3.23.36...
7
by: jeff | last post by:
Hi. I am trying to read addresses from an Exchange 5.5 Global Address Book from an asp.net page. When the page executes the error "Collaboration Data Objects - ]" is generated. Here is the...
21
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the...
3
by: Adman | last post by:
Hi all. I've done some websearching, and haven't been able to find my question answered, so I thought I'd post. I apologize if this has already been answered. My question seems to be a...
2
by: Chucker | last post by:
Hi Community, I think I can store Binary Data in SQL Server but when I try to retrieve it, I always only get one byte. I think I stored my Binary Data in SQL Server in a Colum of Type Image....
4
by: Jason Kumpf | last post by:
OK I've been staring at this code all day and still with everything I have tried I cannot figure out two problems I am having. Once is why the space limit for the directory I create in the code...
9
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so...
12
by: SAL | last post by:
Hello, Is it possible to read a CSV from the Client, and bind my Datagrid to the data in the CSV file without uploading the file to the Server first? I have tried and in Debug mode on my...
1
by: Diego F. | last post by:
Hello. I'm having problems reading data from a socket. In my test, I see the maximum size to get data from the socket is 8192 bytes. In my tests, if I send less that 8192, the readen data have...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...

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.