不知道下面的代码是否能解决你的问题?另外,据我所知,.net runtime V1.1中暂时还没有对FtpClient的支持。/////////////////////////////////////////////////////////////////////// WebClient myWebClient = new WebClient(); //你要的可能是下面这2行代码 NetworkCredential sc = new NetworkCredential(username, password, Domain); myWebClient.Credentials = sc; // Upload the file to the URL using the HTTP 1.0 POST. byte[] responseArray = myWebClient.UploadFile(uriString,"POST",fileName);
WebClient myWebClient = new WebClient();
//你要的可能是下面这2行代码
NetworkCredential sc = new NetworkCredential(username, password, Domain);
myWebClient.Credentials = sc;
// Upload the file to the URL using the HTTP 1.0 POST.
byte[] responseArray = myWebClient.UploadFile(uriString,"POST",fileName);