Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
332 views
in Technique[技术] by (71.8m points)

amazon web services - C# WebClient UploadValues Stuck

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...