提交代码

This commit is contained in:
高飞 2024-06-21 16:23:38 +08:00
parent c8a1a089ae
commit 197b55e6bd
5 changed files with 37 additions and 4 deletions

View File

@ -19,6 +19,9 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static string Http(string url, string method = "GET", string contenttype = "application/json;charset=utf-8", Hashtable header = null, string data = null) public static string Http(string url, string method = "GET", string contenttype = "application/json;charset=utf-8", Hashtable header = null, string data = null)
{ {
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 |
SecurityProtocolType.Tls | SecurityProtocolType.Tls11 |
SecurityProtocolType.Tls12;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = string.IsNullOrEmpty(method) ? "GET" : method; request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype; request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;
@ -96,7 +99,7 @@ namespace BLL
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = string.IsNullOrEmpty(method) ? "GET" : method; request.Method = string.IsNullOrEmpty(method) ? "GET" : method;
request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype; request.ContentType = string.IsNullOrEmpty(contenttype) ? "application/json;charset=utf-8" : contenttype;
if (header != null) if (header != null)
{ {
foreach (var i in header.Keys) foreach (var i in header.Keys)

View File

@ -0,0 +1,30 @@
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.APIGetHttpService.Http(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\API\APIGetHttpService.cs:行号 62
在 BLL.CNCECHSSEWebService.UpCheck_CheckRectify(String checkRectifyId, Sys_User CurrUser) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1302
出错时间:06/21/2024 15:57:07
出错时间:06/21/2024 15:57:07
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.APIGetHttpService.Http(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\API\APIGetHttpService.cs:行号 62
在 BLL.CNCECHSSEWebService.UpCheck_CheckRectify(String checkRectifyId, Sys_User CurrUser) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1302
出错时间:06/21/2024 16:03:12
出错时间:06/21/2024 16:03:12
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 BLL.APIGetHttpService.Http(String url, String method, String contenttype, Hashtable header, String data) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\API\APIGetHttpService.cs:行号 62
在 BLL.CNCECHSSEWebService.UpCheck_CheckRectify(String checkRectifyId, Sys_User CurrUser) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1302
出错时间:06/21/2024 16:04:10
出错时间:06/21/2024 16:04:10

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress> <Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />

View File

@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/> <add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> <add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers> </httpHandlers>
<compilation debug="false" targetFramework="4.6.1"/> <compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/> <httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms"> <authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/> <forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />