473,686 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Uploa dData the correct way to do this? The remote server
doesn't recognise the parameters that I am sending. Is
WebClient.Uploa dValues 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 1140
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.Crea te 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.goo glegroups.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.Uploa dData the correct way to do this? The remote server
doesn't recognise the parameters that I am sending. Is
WebClient.Uploa dValues 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.goo glegroups.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
2040
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 and simple. But ebay webserver send me your password is not valid... But the password is clearly correct.. you can type it at the result page and submit. Then you can see a message - bidding has ended and you are logged in. <- This is the message...
6
13288
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 = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + fileID.ToString() + ".pdf");
4
10314
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: http://www.someURL.com?parm1=data1&parm2=data2. I don't believe these paramters are transmitted as part of the URL with the HTTP Post interface. I was under the impression that the WebClient class automatically handled these parameters for POST. The...
0
1439
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 once the webclient downloads the file, and saves it, if I then try to view the file saved by the webclient, a few chars are completely garbled. Here are a few examples of chars that get wacky...
1
3115
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 strURL As String = CType(URL, String) Dim aRequestedHTML() As Byte Dim objUTF8 As New UTF8Encoding
6
22085
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 (setup.exe). I then use WebClient.DownloadFileAsync (.NET 2.0 Pro.) and all downloads well including progress bar indicator, bytes received, etc... Here is the problem: When I replace the file (setup.exe), with a different, larger file, it still...
6
3559
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 annoying 403 error that causes the script to abort halfway through my download. I am wondering if there is a way in ASP.NET to have my code ignore 403 errors and other network errors, catch the error, and iterate to the next ID in the dataset...
1
12486
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 System.Net.WebClient; $WebClient.Encoding = ::Default; $WebClient.Proxy = ::DefaultWebProxy; $WebClient.Proxy.Credentials = ::DefaultCredentials;
6
4916
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 and the file is copied from the server to the server, rather than from the web client to the server. Please help!!!
0
8520
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8936
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8772
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8780
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7603
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2953
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.