Re: Exceptions during a HTTP post using WebClient

From: Matjaz Ladava (
Date: 06/18/03

Date: Wed, 18 Jun 2003 20:54:19 +0200

You must understand, that when you do upload you are doing it in the context
of ASPNET account. So either you have wrong security settings on remote url,
or you cant resolve the name of the url.
What is the myurl value and what are permissions set on that folder (myurl).
Are you using impersonation ?

Matjaz Ladava, MCSE (NT4 & 2000)
"john" <> wrote in message
> hello,
> i have to request an ASP page from my machine.
> So, i use webclient and UploadData for the HTTP request.
> I specify a credential for the webClient object because
> the site is setup with NTLM authentification :
> NetworkCredential vo_cre = new NetworkCredential
> (user ,pwd,domain);
> web = new WebClient ();
> web.Credentials =  vo_cre ;
> web. UploadData(myurl,"POST",mydata);
> Sometimes, a WebException is thrown :
> NameResolutionFailure or ConnectFailure.
> What could be the causes of these exceptions ?
> Thanks

Relevant Pages

  • Re: Process to upload multiple files from a single
    ... The raw filename is 'mixed' and the field value shows as ... thing to do is post a complete example of an HTTP request for a file ... upload like this, and a cut-down version of the code you are trying to ... file integrity'. ...
  • RE: how to upload file via c# code
    ... upload method is just using the httpwebrequest internally. ... HttpWebRequest or webclient just send http post request to the target ... I've attached a demo application which use HTTPWebRequest to upload ...
  • WebException Method not allowed
    ... I am trying to use WebClient class's UploadData method for uploading ... But when I try to upload data to this file using uri ... at System.Net.WebClient.UploadData(String address, String method, Byte ... // Upload the input string using the HTTP 1.0 POST method. ...
  • Re: How can I add a document in SPS2003 by WebService?
    ... You don't need to use Web Services at all. ... Just upload the document via a ... Http request. ... "Adolph" wrote in message ...
  • C# webclient, uploading a file Error :// Error : Stream ended unexpectedly
    ... server. ... Meanwhile we are able to upload a file from the webserver itself. ... The problem is only with C# webClient. ...