471,310 Members | 1,058 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 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 1081
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by mc kim via .NET 247 | last post: by
4 posts views Thread by Paul J. Lay | last post: by
reply views Thread by Jeremy | last post: by
6 posts views Thread by Giovanni | last post: by
6 posts views Thread by =?Utf-8?B?U2NvdHQgVHJpY2s=?= | last post: by
reply views Thread by rosydwin | last post: by

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.