acumatica - 部署后,soapClient.Login 到 Windows 窗体应用程序中的 Acumatica 失败。“向 https 发出 HTTP 请求时发生错误..”
问题描述
使用 Contract SOAP to Acumatica 的 Windows 窗体应用程序在开发机器上运行良好。
在生产服务器 (Windows 2008) 上使用完全相同参数的 soapClient.Login 崩溃并显示错误消息:
错误消息:向https://XXX.acumatica.com/entity/Default/17.200.001发出 HTTP 请求时发生错误。这可能是由于在 HTTPS 情况下未使用 HTTP.SYS 正确配置服务器证书。这也可能是由于客户端和服务器之间的安全绑定不匹配造成的。
堆栈跟踪:服务器堆栈跟踪:在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan 超时)在 System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException,HttpWebRequest 请求,HttpAbortReason abortReason)。 ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation , Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy。调用(IMessage 消息)
在 [0] 处重新引发异常:在 AcmtIntegrator.AcumaticaWSDL 的 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 处的 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)。 D:\C2019\AcumaticaIntegrator AcmtIntegrator.AcumaticaWSDL.DefaultSoapClient.Login(String name, String password, String company, String branch, String locale) 中的 DefaultSoap.Login(String name, String password, String company, String branch, String locale) \AcumaticaIntegrator\Connected Services\AcumaticaWSDL\Reference.cs:line 49298 at AcmtIntegrator.frmExtractLists.LoopAction(String lcAction, String lcExtractType, Boolean& llSuccess) in D:\C2019\AcumaticaIntegrator\AcumaticaIntegrator\frmExtractLists.cs:line 134,来源:mscorlib ,InnerException:底层连接已关闭:发送时发生意外错误。,
解决方案
更改了两个修复程序以使其正常工作:
WSDL 服务引用被替换为指向 Acumatica 生产 URL,并且
安全协议设置为 TLS 1.2:System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
感谢所有试图提供帮助的人。
推荐阅读
- python - 速度和内存权衡将 Apache Beam PCollection 一分为二
- python - 在目标变量中具有多类实验室的神经网络中的python交叉验证中
- lua - 如何在 Lua 中打开 Google chrome 中的链接?
- java - 在 Java 中列出虚拟磁盘
- wpf - 为什么 WPF/XAML 绑定使用 x:Reference 气质?
- linux - 在 sh 脚本中重定向 STDOUT 和 STDERR 失败
- mysql - 在mysql中将特定数据从一个表复制到另一个表
- c++ - C++:我的程序的平均输出没有正确显示
- python - 有没有更简洁的方法来有条件地循环数据框中的行?
- python - 在 Python 中下采样变量并插入 NaN