From cfdd360702fa8bc7fadd4aa5d9286206a61de9cd Mon Sep 17 00:00:00 2001 From: dev02 Date: Tue, 26 Sep 2023 18:24:03 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E8=AA=BF=E6=95=B4?= =?UTF-8?q?=E5=BE=8C=E5=8F=B0=E5=90=8C=E6=AD=A5http=20request=E6=99=82?= =?UTF-8?q?=E9=96=93=E9=99=90=E5=88=B6=E7=84=A1=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Services/Implement/webRequestService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Backend/Services/Implement/webRequestService.cs b/Backend/Services/Implement/webRequestService.cs index ac77144..0fbf0db 100644 --- a/Backend/Services/Implement/webRequestService.cs +++ b/Backend/Services/Implement/webRequestService.cs @@ -150,6 +150,7 @@ namespace Backend.Services.Implement streamWriter.Write(json); } + cp_Postrequest.Timeout = System.Threading.Timeout.Infinite; HttpWebResponse cp_response = (HttpWebResponse)cp_Postrequest.GetResponse(); var cp_responseString = new StreamReader(cp_response.GetResponseStream()).ReadToEnd(); @@ -183,6 +184,7 @@ namespace Backend.Services.Implement Postrequest.Method = "GET"; Postrequest.Headers.Add("Authorization", "Basic " + encoded); Postrequest.PreAuthenticate = true; + Postrequest.Timeout = System.Threading.Timeout.Infinite; HttpWebResponse response = (HttpWebResponse)Postrequest.GetResponse(); var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); @@ -201,6 +203,7 @@ namespace Backend.Services.Implement Postrequest2.Method = "GET"; Postrequest2.Headers.Add("Authorization", "Basic " + encoded); Postrequest2.PreAuthenticate = true; + Postrequest2.Timeout = System.Threading.Timeout.Infinite; HttpWebResponse response2 = (HttpWebResponse)Postrequest2.GetResponse(); var responseString2 = new StreamReader(response2.GetResponseStream()).ReadToEnd(); @@ -498,6 +501,7 @@ namespace Backend.Services.Implement Postrequest.Method = "GET"; Postrequest.Headers.Add("Authorization", "Basic " + encoded); Postrequest.PreAuthenticate = true; + Postrequest.Timeout = System.Threading.Timeout.Infinite; HttpWebResponse response = (HttpWebResponse)Postrequest.GetResponse(); var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd(); @@ -517,6 +521,7 @@ namespace Backend.Services.Implement Postrequest2.Method = "GET"; Postrequest2.Headers.Add("Authorization", "Basic " + encoded); Postrequest2.PreAuthenticate = true; + Postrequest2.Timeout = System.Threading.Timeout.Infinite; HttpWebResponse response2 = (HttpWebResponse)Postrequest2.GetResponse(); var responseString2 = new StreamReader(response2.GetResponseStream()).ReadToEnd();