From 83407432a90a858525bc7c0a45f83c1495248fb2 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 13 Jul 2023 10:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9B=86=E5=9B=A2=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E4=B8=8A=E6=8A=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/ZHGL/DataSync/ServerService.cs | 3 +++ SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/SGGL/BLL/ZHGL/DataSync/ServerService.cs b/SGGL/BLL/ZHGL/DataSync/ServerService.cs index b4773b63..c20b47a9 100644 --- a/SGGL/BLL/ZHGL/DataSync/ServerService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ServerService.cs @@ -4,6 +4,7 @@ using RestSharp; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Security.Policy; using System.Text; using System.Threading.Tasks; @@ -20,6 +21,7 @@ namespace BLL var client = new RestClient(baseurl); client.Timeout = -1; var request = new RestRequest(Method.POST); + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var thisUnitId = BLL.Const.UnitId_CD; var thisUnit = BLL.UnitService.GetUnitByUnitId(thisUnitId); request.AddParameter("UnitName", thisUnit.UnitName); @@ -55,6 +57,7 @@ namespace BLL var client = new RestClient(baseurl); client.Timeout = -1; var request = new RestRequest(Method.POST); + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var tokenItem = GetToken(); request.AddHeader("token", tokenItem.Token); request.AddJsonBody(JsonBody); diff --git a/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs b/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs index 1c7f4454..af736f74 100644 --- a/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/SysConstSet.aspx.cs @@ -8,6 +8,7 @@ using BLL; using Newtonsoft.Json; using RestSharp; using Model; +using System.Net; namespace FineUIPro.Web.SysManage { @@ -1161,6 +1162,7 @@ namespace FineUIPro.Web.SysManage var client = new RestClient(baseurl); client.Timeout = -1; var request = new RestRequest(Method.POST); + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var thisUnit = BLL.UnitService.GetUnitByUnitId(BLL.Const.UnitId_CD); request.AddParameter("UnitName", thisUnit.UnitName); request.AddParameter("CollCropCode", thisUnit.CollCropCode);