HttpWebRequest works. WebClient.UploadFile doesn't
问题 I thought I figured out a way to simplify my code by using WebClient.UploadFile instead of HttpWebRequest , but I end up getting a file on the server end that is a few dozen bytes too short and corrupted. Any idea where the bug lies? Thanks Using HttpWebRequest (works fine): HttpWebRequest req = (HttpWebRequest)HttpWebRequest .Create("http://" + ConnectionManager.FileServerAddress + ":" + ConnectionManager.FileServerPort + "/binary/up/" + category + "/" + Path.GetFileName(filename) + "/" +