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

Is WebClient the correct Class to be using for this app?

My app needs to make 3 calls to a remote server. 2 contain key value
pairs, and one is a simple ping type call. All 3 are to listen for data
returned in key-value pairs.

Is WebClient.UploadData the correct way to do this? The remote server
doesn't recognise the parameters that I am sending. Is
WebClient.UploadValues an easier way to do the same thing (i.e. makes
packaging of the keys and values more simple)?

Should the ping type call be using a different class altogether?

Greg.

Dec 20 '05 #1
3 1130
Hi,

Depend of the remote end, if it;s a web server expecting a http request and
the data in the url you can use webrequest.Create to create it.

Later you have to check the format of the data you receive , just read it in
a stream and dump it in the console.
Please explain further what you mean with "ping type" . IIRC there is not a
Ping class in teh framework
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Greg" <gr*************@yahoo.co.uk> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
My app needs to make 3 calls to a remote server. 2 contain key value
pairs, and one is a simple ping type call. All 3 are to listen for data
returned in key-value pairs.

Is WebClient.UploadData the correct way to do this? The remote server
doesn't recognise the parameters that I am sending. Is
WebClient.UploadValues an easier way to do the same thing (i.e. makes
packaging of the keys and values more simple)?

Should the ping type call be using a different class altogether?

Greg.

Dec 20 '05 #2
Thanks Ignacio.

I've got the 2 calls to the remote server that send data working ok. I
can't test the other one since it hasn't been implemented on the server
yet. By ping type, I meant just that - just a call to an application on
the remote server sending it no data at all, and listening for the
appropropriate response. It doesn't matter what sort of application I'm
calling on the remote server, its the principle that I'm concerned
with.

Thanks again,

Greg.

Dec 20 '05 #3
Hi,
"Greg" <gr*************@yahoo.co.uk> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Thanks Ignacio.

I've got the 2 calls to the remote server that send data working ok. I
can't test the other one since it hasn't been implemented on the server
yet. By ping type, I meant just that - just a call to an application on
the remote server sending it no data at all, and listening for the
appropropriate response. It doesn't matter what sort of application I'm
calling on the remote server, its the principle that I'm concerned
with.


The type of application is of the utter importance, it may be a non http app
and if so you cannot use Httpwebrequest, the Ping ( the real one ) is one
such examples.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 20 '05 #4

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

Similar topics

0
by: mc kim via .NET 247 | last post by:
What I am trying to is automatic bidding process in Ebay site... WebClient class can uploads form data easily. I have collected ebay url & form data to uploads.. Most of process is quite easy...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
4
by: Paul J. Lay | last post by:
I am sending and receiving multipart messages using the WebClient UploadData method Method=Post. Everything seems to work well except when the URL contains parameters. For example:...
0
by: Jeremy | last post by:
Hi all, I'm using the webclient class in VB.net to download a web page and save it locally. I have a few chars in the html that appear fine when the html page is viewed itself in IE, but...
1
by: Scampi | last post by:
Hi, I've been working on an application to do some 'scraping' of web content, using the WebClient class. I'm using code rather like the following.. Dim objWebClient As New WebClient Dim...
6
by: Giovanni | last post by:
Hi Guys, Really strange problem I am experiencing... I have setup a virtual directory with Read Only permissions on an ISA/IIS server (SBS 2003). In that virt. dir., I placed 1 file...
6
by: | last post by:
I've written a very small ASP.NET page to scrape thousands of pages of content based on database IDs. It loops through a dataset to get the IDs. It worked well in testing but now I am getting an...
1
by: Mike | last post by:
I am using PowerShell to download an XML file into a string using the DownloadString(URI) method of System.Net.WebClient object. Sample commands below: $Result = $Null; $WebClient = new-object...
6
by: =?Utf-8?B?U2NvdHQgVHJpY2s=?= | last post by:
I followed the instructions from MSDN for Webclient UploadFile and I get an error: Could not find file 'C:\testfile.xls'. If I add the file (c:\testfile.xls) to the server I do not get the error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...

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.