Search Results

Search found 3 results on 1 pages for 'uploaddataasync'.

Page 1/1 | 1 

  • [C#] WebClient - Upload data, get stream

    - by Barguast
    I have a situation where I want to asynchronously write a series of bytes with WebClient (in much the same way as UploadDataAsync) and get a readable response stream (in the same way as OpenReadAsync). You seem to be able to do the two individually, but not both of them together. Is there a way? Thanks!

    Read the article

  • [ASP.NET] Odd HttpRequest behaviour

    - by barguast
    I have a web service which runs with a HttpHandler class. In this class, I inspect the request stream for form / query string parameters. In some circumstances, it seemed as though these parameters weren't getting through. After a bit of digging around, I came across some behaviour I don't quite understand. See below: // The request contains 'a=1&b=2&c=3' // TEST ONLY: Read the entire request string contents; using (StreamReader sr = new StreamReader(context.Request.InputStream)) { contents = sr.ReadToEnd(); } // Here 'contents' is usually correct - containing 'a=1&b=2&c=3'. Sometimes it is empty. string a = context.Request["a"]; // Here, a = null, regardless of whether the 'contents' variable above is correct Can anyone explain to me why this might be happening? I'm using a .NET WebClient and UploadDataAsync to perform the request on the client if that makes any difference. If you need any more information, please let me know.

    Read the article

  • How to set post parameters in WebClient class in a Silverlight app.

    - by cmaduro
    First of all, I wrote a simple php page, that picks up some variables from the POST parameters such as a query and a authentication string, and returns the result as xml. I intend to call this page with the WebClient class from a Silverlight application. I'm using POST because we are querying the database with any valid sql statement, not only select statements. The WebClient class uses the UploadDataAsync method to post to a http server, however it requires the post parameters be passed as a NameValueCollection. This class is missing in the Silverlight runtime. How do I proceed???

    Read the article

1