I am trying to post data on API But looks like it stuck at line webClient.UploadValues on Amazon Cloud Windows Machine, it's working fine on Local Windows Computer, But not working on AWS Windows machine it stuck, is there different architecture or any additional settings needed to run it on AWS windows machine.
foreach (string filename in filePaths)
{
string payload = System.IO.File.ReadAllText(filename);
using (WebClient webClient = new System.Net.WebClient())
{
var _postParams = new System.Collections.Specialized.NameValueCollection();
webClient.Headers.Add("headertoken", Common._WebAPIKey);
byte[] responseByes = webClient.UploadValues(Common._APIURL, "POST", payload);
_returnValue = Encoding.UTF8.GetString(responseByes);
}
_filename = filename;
System.IO.File.Delete(filename);
}
question from:
https://stackoverflow.com/questions/65940398/c-sharp-webclient-uploadvalues-stuck 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…