WebClient is a class for .NET Framework applications that provides methods for sending and receiving data from a resource identified by a URI.

learn more… | top users | synonyms

0
votes
0answers
16 views

WebClient DownloadFile method downloads damaged PDF files

In my Windows application I am using WebClient DownloadFile method to download several PDF files from a server on local network. Each file is a report that gets generated when its URL is called. ...
0
votes
0answers
18 views

Log In With Paypal Unauthorized To Non US Residents

I am attempting to set up Log In With Paypal, but I am receiving a Unauthorized Message ("{\"error_description\":\"Unable to generate token\",\"error\":\"access_denied\"}") while obtaining the access ...
1
vote
1answer
30 views

.NET WebClient sends request without authentication first

I'm building a web service with Asp.net web api, and I have to fetch an image from an AXIS IP Camera. The camera, however, uses Digest authentication. So my C# code looks something like this: ...
0
votes
1answer
16 views

.NET Submitting HTTP request to webservice that requires nameless parameter in query string

I'm creating some classes to interact with a web service (built by a 3rd party), that in (almost) all cases only accepts GET queries. One of my classes is a WebServiceClient class, which encapsulates ...
0
votes
1answer
8 views

CookieAwareWebClient argument cant be zero

I was using this code to login and download needed files for about half a year, and now its started throwing an exception The parameter '{0}' cannot be an empty string. Parameter name: cookie.Domain, ...
1
vote
1answer
27 views

How To Download Image by WebClient

I can download a pic by webclient and successfully paint on picture box. But my question is how can i avoid re download the same image from the net using the cache system. But i don't want to save it ...
2
votes
2answers
27 views

Post request on windows phone

I tried to make a request on a webserver with my windows phone, but I doesn't work. I have this code that works on my computer var client = new WebClient { BaseAddress = ...
1
vote
2answers
41 views

file downloading from internet using C#

I use this code: private void button1_Click(object sender, EventArgs e) { string url = @"http://dl2.soft98.ir/soft/NET.Framework.4.5.50709.x86-x64.rar"; // Create an instance ...
0
votes
2answers
30 views

WebClient powershell Download return an empty file

I am trying to download the image below into a local directory but the resulted image appears empty. http://www.capecountyhomes.com/Homes/Images/Listings/77977723/1/Photo.jpg This seems like a ...
1
vote
0answers
19 views

How can I get WebClient (webservice client) to automatically use the default proxy server?

I'm calling a webservice from a WinForms app. Everything works fine when a proxy server isn't in use, however when a proxy is being used, the app crashes as instead of the XML response it's expecting ...
0
votes
0answers
24 views

lost session, cant access to download data

public static byte[] BBStorageGetFile(string filePath, int projectId) { var queryString = QueryStringEncoder.bbs_encode("a=g&p=" + filePath + "&s=" + projectId); var url = ...
0
votes
0answers
15 views

WebClient doesn't post XML

I know there are many questions about the Web Client, but here's a new one. :) I want to post an XmlDocument with the help of Web Client but the XML never arrive at the other side. The Tomcat always ...
0
votes
0answers
21 views

using webclient and webproxy but having the error:“The underlying connection was closed: An unexpected error occurred on a send”

So I'm sure my problem is using proxy while trying to downloading the source of an https website and it always comes up with this error: "The underlying connection was closed: An unexpected error ...
0
votes
1answer
47 views

“The underlying connection was closed: The connection was closed unexpectedly”

When i try to get html page i get this error: The underlying connection was closed: The connection was closed unexpectedly I think the site I'm getting, is using some protection based on ip. ...
0
votes
1answer
43 views

webclient doesn't download the web page completely

Have code for download page: System.Net.WebClient client = new System.Net.WebClient(); client.Headers.Add("user-agent", "Mozilla/20.0.1"); byte[] feedBytes; string url; url = ...
1
vote
1answer
23 views

Why .Net WebClient is able to use HTTPS without any configuration whereas Java HttpClient can't

Don't be surprised but my question is not about something not working: why the .Net WebClient is able to use HTTPS out-of-the-box without any configuration? I wouldn't ask if I had not some serious ...
2
votes
3answers
53 views

How to catch The remote server returned an error: NotFound?

I work on a project target Windows Phone 7.5 and above. I use a method to get online image and check the type of the image, if it is gif then I will coonvert it into jpg and bind it to a image ...
0
votes
1answer
13 views

.Net WebClient fails for very long query string

I'm trying to connect to a oracle webmethods web service which takes an xml file as a query string. The query string is very long, sometimes around 400K chars. WebClient, HttpWebRequest etc. does not ...
0
votes
0answers
23 views

Getting “Handshake failed…unexpected packet format” when using WebClient.UploadFile() with “https” when the server has a valid SSL certificate

I am trying to use WebClient.UploadFile with a HTTPS URL but I am ending up with "System.IO.IOException: The handshake failed due to an unexpected packet format" The same code works perfectly ...
0
votes
1answer
42 views

WebClient DownloadFileAsync() blocks thread

I'm trying to download a large file (500 mb) from my webserver using WPF and MVVM. Thus the following properties are all bound to some kind of controls (progressbar). The problem is, that the ...
1
vote
1answer
36 views

How to find out the right encoding of a webservice respose?

I'm developing a Windows pone 8 application that is calling a third party web service. That service is returning some text with the following response: HTTP/1.1 200 OK Date: xxxxxxxxxx Server: ...
2
votes
1answer
30 views

Using Web.Net.WebClient to download a file

I am beginner in the download files and directories with c# using Web.Net.WebClient. I tried this snippet to download a file: Upload.Models.FichierModels fichier = new FichierModels(); WebClient ...
0
votes
1answer
61 views

Why it always throws an ObjectDisposedException?

Due to the face that the windows phone can't handle gif, I write a little method, but it seems that it has a little error. The code below always throws a exception when it runs to (JPG and PNG ...
1
vote
1answer
33 views

Progress Bar won't work for the third download in VB.NET

I'm trying to download 4 files simultaneously using 4 webclients. It download all 4 files simultaneously but the progress bar of first two works fine and the third progress bar exactly moves with the ...
0
votes
1answer
20 views

webclient or httpwebrequest to retrieve hrefs and url

How do I use either webclient or httpwebrequest to do two things: 1)Say after downloading the resource as a string using: var result = x.DownloadString("http://randomsite.com); there's a relative ...
0
votes
0answers
12 views

WebClient.OpenWriteTaskAsync examples

OK, so this one has Google totally stumped. Does anyone have an example of WebClient.OpenWriteTaskAsync where you can also read the response? I understand how to write the request and handle the ...
0
votes
0answers
23 views

Custom deserialization

I am building an integration towards a third party system that takes its input as URL parameters or form data, and the output is semi plain text, see the example below. Methods (add, update, delete) ...
4
votes
2answers
52 views

How to close browser after creating C# WebClient class?

I provide an HTTP web service and one of my users is using C# WebClient class on a Windows 2003 machine to retrieve data from my website. My user says that WebClient is creating many browser ...
0
votes
2answers
43 views

Get meta data of a file using c#

I need to find a files's meta data using c#.The file i use is saved in third party site. I can able to download the file from that server but i can't able to get the original meta data of the file ...
3
votes
1answer
94 views

The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF, In WinForms?

I am trying to use a WebClient / HttpWebRequest to download some data from a server. I use the following code to do so: WebClient client = new WebClient(); client.Credentials = new ...
0
votes
2answers
56 views

WebClient freezes when async-downloading a second file if I'm getting the original filename from Content-Disposition

I'm writing an application that manages a library of mods/addons for a game. Every so often, one of these mods has an update available, and the new version is downloaded using ...
0
votes
1answer
40 views

“Established connection was aborted by the software in your host machine” (IIS)

I'm trying to configure IIS 7.5 so that it can serve large (400mb) files via HTTP. The client is a C# client using WebClient.DownloadFile() (basically wrapping an HTTP GET request). However when ...
0
votes
1answer
30 views

Tracking upload progress of WebClient

So I am currently uploading files via a php script on my webserver using the following code: string file = "dp.jpg"; System.Net.WebClient Client = new System.Net.WebClient(); ...
0
votes
2answers
61 views

BackgroundWorker with Webclient downloadstring

So basically I want to retrieve the content of a .txt file on the internet and write it into a a label. However though, while it does this Windows Forms freezes. So I thought of putting it into a ...
0
votes
2answers
49 views

WP8 TaskCompletionSource not getting Result

I've an extension method for WebClient (WP8) public static Task<string> DownloadStringTask(this WebClient webClient, Uri uri) { var tcs = new ...
0
votes
1answer
28 views

Using WebClient to login and download files

I've found different examples of doing this, but haven't been able to get any combination of them to work. Basically, I have an intranet system that can generate documents from a web link, and I know ...
2
votes
1answer
90 views

Async Exception Handling in F#

I am trying to write non-blocking code in F#. I need to download a webpage, but sometime that webpage doesn't exist and an exception is thrown (404 Not Found) by AsyncDownloadString. I tried the code ...
0
votes
1answer
48 views

Unable to receive cookie using WebClient

Correct me, if I'm wrong in my thoughts. As I understand, any new instance of WebClient class will start a new session, generating the new session id. To prevent this, I should receive a session id ...
1
vote
1answer
119 views

The remote name could not be resolved - webclient

I am facing this error : The remote name could not be resolved: 'russgates85-001-site1.smarterasp.net' When I request html contents to read using web client it gives me error. Below is my code. ...
0
votes
0answers
16 views

ThreadAbortException suddenly appears after godaddy changed servers

Recently, one of my clients informed me that GoDaddy had contacted them to let them know they were going to move their hosting account from one server to another. When they did that, they failed to ...
0
votes
0answers
33 views

WebClient doesn't raise events

I'm trying to download all files listed by a PHP script with the file name and md5 checksum, comparing them to the local ones and if they differ download updated ones. It downloads file by file for ...
0
votes
1answer
32 views

Silverlight WebClient file upload issue in Chrome

I have a strange issue about WebClient class in Silverlight app when using Chrome. I can successfully upload file with IE but when I use Chrome its failing. When I digg into it I see that WebClient ...
1
vote
1answer
59 views

How to avoid the 0-byte file on Webclient download error

When using the following code to download a file: WebClient wc = new WebClient(); wc.DownloadFileCompleted += new System.ComponentModel.AsyncCompletedEventHandler(wc_DownloadFileCompleted); ...
0
votes
0answers
28 views

Remote post doesn't work but no errors to be found

So I'm back to remote post hassles This time, I've got a PayPal Buy Now button that I'm trying to get working. Currently my code just builds the post that goes to PayPal and when the payment is ...
0
votes
1answer
116 views

WebClient Download - “Access to the path 'c:\\windows\\system32\\inetsrv\\MyPrintManager.exe' is denied”

I am attempting to download a file from another IIS site on my local machine. I have my main website that is trying to download from another public site that contains a few files that the user will be ...
0
votes
0answers
30 views

Download String Async with post parameters

I've used WebClient.DownloadStringAsync to get a Page's output, until my URL got too long (too much GET parameters). Now I'd like to send the parameters via POST, but still get the site's output. I ...
0
votes
0answers
24 views

Setting WebClient identify in C# for AWStat

I am working on a C# application that downloads xml from a web server using WebClient. How do I set the identity of the application so I can see it in the web servers AWStat? I try both ...
0
votes
0answers
12 views

Determine whether DIGEST authentication is required

I am using .net's WebClient class to access files on a WebDAV server. Currently, I am setting the credentials directy: webClient.Credentials = new NetworkCredential(ioc.UserName, ioc.Password); ...
2
votes
1answer
66 views

Why does publish fail to publish System.Net.Http.dll?

I have a WPF application written in C# that is failing to publish the System.Net.Http.dll and System.Net.Http.WebRequest.dll. When the user launches the application they receive the error: Could ...
0
votes
1answer
81 views

Download file from server using URL

I have a dot net mvc project where on the server side people generate reports. To allow downloading report from web, I have a function in controller that return File. public FilePathResult ...

1 2 3 4 5 27
15 30 50 per page