From a winforms application, I need to upload & download files to an asp.net web server using http/https.
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.