webclient

Asynchronous use of webclient to transfer files

I have an objective to transfer some files which can be pdf, jpg and xml from one location to another. I am creating a handler based API for that. What could be the best approach for doing it? Should i return a byte array so that the client can pick the byte array and convert it back to file? Also the max file size I need to handle is 18...

Problem with uploading values via webclient

I am trying upload a NameValueCollection to a web service. My name value collections are bunch of records that I need to send from a C# client to my webservice. Now, on the service side, in debug mode, I keep getting error, Format exception for the integer values I had uploaded. e.g. NameValueCollection data = new NameValueCollection(...

WebClient.DownloadFileAsync downloading the file on server

I am downloading a file from a remote location to my local machine. The paths I am using are saved in web.config and are in following format: <add key="FileFolder" value="Files/"/> <add key="LocalFileFolder" value="D:\REAL\" /> the code I am using to download is: CreateDirectoryIfDoesNotExist(); WebClient webClient = new WebClien...

Is this an inefficient way to parse XML?

I'm probably worrying about wrong optimization, but I have this nagging thought that it's parsing the xml tree over and over and over again, maybe I read it somewhere. Can't remember. Anyways, here's what I'm doing: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using System...

visual studio c# webclient

Can i use like webclient or webrequest (I dont know) to do the following: click a button, once its click it send a string lets say "Hello" to a website's textbox, for example: button1 click, write "Hello" on textbox1 on website http://Test.com ...

Silverlight: Difficulty with WebClient

I'm having a really weird issue. I must be doing something really obvious that is wrong, but I can't see it. I'm building a wp7 app which currently runs in the emulator. I have a URL that returns JSON. I visit this URL in my browser and verify that it works. I get the data from this URL in Silverlight using WebClient. When I get the re...