简体   繁体   中英

Upload/download files securly, winforms c# and asp.net

From a winforms application, I need to upload & download files to an asp.net web server using http/https.

  • only need to send/receive one file at a time
  • cannot use ftp, must use http/https
  • need progress bar
  • upload & download must be username/password authenticated

Is there an easy way to do this?

The WebClient class should be able to do everything you need to do. Use either UploadFileAsync Or UploadDataAsync for the upload (and their counterparts for the download), normal HTTP authentication for the username and password (see the Credentials property) and the UploadProgressChanged event for tracking progress for your progress bar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM