Asp.net Kashflow.NET-远程主机强制关闭了现有连接

Asp.net Kashflow.NET-远程主机强制关闭了现有连接,asp.net,Asp.net,我正在使用发现的kashflow soap API() 我没有对代码进行任何更改,但是,从今天开始就出现了一个错误 我将在下面粘贴完整的错误,非常感谢任何帮助,因为工作人员无法根据需要处理此问题,从而破坏应用程序 Server Error in '/' Application. An existing connection was forcibly closed by the remote host Description: An unhandled exception occurred dur

我正在使用发现的kashflow soap API()

我没有对代码进行任何更改,但是,从今天开始就出现了一个错误

我将在下面粘贴完整的错误,非常感谢任何帮助,因为工作人员无法根据需要处理此问题,从而破坏应用程序

Server Error in '/' Application.
An existing connection was forcibly closed by the remote host
Description: An unhandled exception occurred during the execution of the current web request. Please 
review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by 
the remote host

Source Error:


Line 6967:        
Line 6968:        public int InsertOrUpdateProject(out string Status, out string StatusDetail, string 
UserName, string Password, KashFlow.Project Project) {
Line 6969:            return base.Channel.InsertOrUpdateProject(out Status, out StatusDetail, 
UserName, Password, Project);
Line 6970:        }
Line 6971:        

Source File: c:\Users\xx\AppData\Local\Temp\Temporary ASP.NET 
Files\vs\11510ad2\e6b292f4\App_WebReferences.dpd9l9xp.0.cs    Line: 6969

Stack Trace:


[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) 
+111
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +131

[IOException: Unable to read data from the transport connection: An existing connection was forcibly 
closed by the remote host.]
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +299
System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +32
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +164
System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, 
AsyncProtocolRequest asyncRequest) +297
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest 
asyncRequest) +51
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, 
AsyncProtocolRequest asyncRequest) +166
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +573
System.Net.TlsStream.CallProcessAuthentication(Object state) +44
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback 
callback, Object state, Boolean preserveSyncCtx) +195
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, 
Object state, Boolean preserveSyncCtx) +22
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, 
Object state) +67
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +803
System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +54
System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +105
System.Net.ConnectStream.WriteHeaders(Boolean async) +449

[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
System.Net.HttpWebRequest.GetResponse() +1463
System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +56

[CommunicationException: An error occurred while making the HTTP request to 
https://securedwebapp.com/api/service.asmx. This could be due to the fact that the server certificate 
is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch 
of the security binding between the client and the server.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +159
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +353
KashFlow.KashFlowAPISoap.InsertOrUpdateProject(String& Status, String& StatusDetail, String UserName, 
String Password, Project Project) +0
KashFlow.KashFlowAPISoapClient.InsertOrUpdateProject(String& Status, String& StatusDetail, String 
UserName, String Password, Project Project) in c:\Users\xx\AppData\Local\Temp\Temporary 
ASP.NET Files\vs\11510ad2\e6b292f4\App_WebReferences.dpd9l9xp.0.cs:6969
we3.Dal.Quotes.InsertProjectIntoKashflow(Int32 quoteid, Boolean force) in 
C:\Users\xx\source\repos\xx\App_Code\xx\xx.vb:539
we3.Dal.Applications.CreateInvoice(Int32 applicationid) in 
C:\Users\xx\source\repos\xx\App_Code\xx\xx.vb:109
xx.btnKashflow_ServerClick(Object sender, EventArgs e) in 
C:\Users\xx\source\repos\xx\xx\xx\xx.aspx.vb:317
System.Web.UI.HtmlControls.HtmlAnchor.OnServerClick(EventArgs e) +121
System.Web.UI.HtmlControls.HtmlAnchor.RaisePostBackEvent(String eventArgument) +108
System.Web.UI.HtmlControls.HtmlAnchor.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String 
eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9845228
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean 
includeStagesAfterAsyncPoint) +1696

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0

我今天也犯了Kashflow错误。似乎Kashflow已将其终端更新为TLS12。在API调用之前的某个地方添加此项,它应该能够完成以下工作:

 System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12