1
Answer

The webclient Uploadfile Methods Hangs

David Smith

David Smith

7y
1.9k
1
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)