David Smith

David Smith

  • NA
  • 2k
  • 0

The webclient Uploadfile Methods Hangs

Feb 1 2018 4:10 PM
The webclient Uploadfile method randomly Hangs. Can someone give me some assistance on the why the webclient UploadFile() function hangs.
  1. WebClient client = new WebClient();  
  2. client.Credentials = CredentialCache.DefaultCredentials;  
  3. client.UploadFile(ipaddr, "POST", @"C:\Temp\ImageShow\White--Dot.png" ); //It hangs on this line randomly  
  4. client.Dispose();  

Answers (1)