Questions tagged [webclient.uploaddata]

31 questions
0
votes
1 answer

How to upload files from local drive to azure blob using webclient upload method

I want to upload files from my local machine to windows azure containers using webclient upload method UploadFile(Uri, String) I dont want to use any cloud or azure api's to upload, reason being i am uploading files from Sql server…
mahesh
  • 3,067
  • 16
  • 69
  • 127
0
votes
1 answer

C# POSTing values from NameValueCollection

How do I get the Content-Length for a POST of NameValueCollection values? I am adding the "Content-Length" header, but don't know what to put in it. public static string Post (string url, NameValueCollection formData) { string response; int…
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
0
votes
1 answer

C# WebClient.UploadData

I'm a .NET newbie and I'm playing with the WebClient class to consume a simple rest service. What I need to do is post a file to the service with some parameters in QueryString. The WebClient provides the QueryString NameValueCollection which is…
user711643
  • 297
  • 2
  • 18
0
votes
0 answers

Why my application is slowed after using webClient to upload picture?

I use xamarin forms to make multiplatforms applications, I want to upload picture in a server but when I upload all pictures my application is very slowed. I use the WebClient to make request. there is my upload function: public static async…
rem
  • 161
  • 1
  • 12
0
votes
1 answer

WebClient UploadData fails with SSL/TLS Error

I'm using the System.Net.WebClient class (https://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.110).aspx) to communicate with a REST API of a server. I'm able to do most operations without problems, but I can't get the "UploadData"…
Øystein Kolsrud
  • 359
  • 2
  • 16
0
votes
0 answers

How to read status code from response body of c# webclient request

I am uploading data to my third party API and getting a byte[] as response. I need to read the status code from my response body as to if I am getting status code as 200 or not or if it was successfully uploaded or not. Any suggestions. Code…
LeoNegi
  • 31
  • 11
0
votes
1 answer

How to read data from WebClient.UploadData

First time posting! I've been breaking my head on this particular case. I've got a Web application that needs to upload a file towards a web-api and receive an SVG file (in a string) back. The web-app uploads the file as follows: using (var client =…
0
votes
0 answers

How to create a multipart post request to upload a file to server using webclient?

I want to implement functionality to upload files to box.And it requires a multipart post request.I am using .net 3.5, so I can't use HttpClient. Also, I want to implement it using webclient as it allows to track progress and I want to show the…
V K
  • 1,645
  • 3
  • 26
  • 57
0
votes
1 answer

Does WebClient UploadProgressChanged event doesn't work for "PUT" method

I am using a "PUT" rest webservice to upload a file to One Drive.I have used both UploadDataAsync and UploadStringAsync methods of webclient. But in both cases the UploadProgressChanged event is only fired after the whole file is uploaded.Please…
V K
  • 1,645
  • 3
  • 26
  • 57
0
votes
3 answers

WebClient exception when UploadValues

I want to call a WebClient like this: using (TimeoutWebClient client = new TimeoutWebClient()) { System.Collections.Specialized.NameValueCollection reqparm = new System.Collections.Specialized.NameValueCollection(); …
Samuel Prevost
  • 1,047
  • 1
  • 11
  • 30
0
votes
1 answer

No connection could be made because the target machine actively refused it 127.0.0.1:54568

The following error started coming up suddenly! It worked for months after the application was deployed on the server but suddenly it has stopped working and showing the following error. The code I am using as follows: private void PostData() { …
0
votes
1 answer

UnauthorizedAccessException on uploaddata/uploadfile using webclient with network credentials

While in my server I have assigned full control permissions for the folder where the files needs to be uploaded. The website's application pool identity is being set with a domain user credentials, the website has anonymous authentication enabled…
0
votes
1 answer

WebClient HttpClient Upload From WP8

Seriously i search a lot upload file from WP8 to server. it's doesn't work :( Why i get this error?? it's the error is because my FileuploadUrl? System.Net.Http.HttpRequestException: Response status code does not indicate success: 405 (Method Not…
0
votes
1 answer

Anyone have example sample for Webclient upload in WP8?

I found many tutorials using WebClient to upload files. by using webCleint.uploadFile. But in WP8 there is no support. Anyone have any idea???
-1
votes
4 answers

WebClient returning 403 error only for this website?

I am trying to download file from these links by using C# WebClient, but I am getting 403…