Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Performance Loadrunner Web服务错误套接字连接中止_Performance_Web Services_Loadrunner_Nettcpbinding_Socket Timeout Exception - Fatal编程技术网

Performance Loadrunner Web服务错误套接字连接中止

Performance Loadrunner Web服务错误套接字连接中止,performance,web-services,loadrunner,nettcpbinding,socket-timeout-exception,Performance,Web Services,Loadrunner,Nettcpbinding,Socket Timeout Exception,通过导入服务的WSDL,我正在使用LR VuGen 12.02和Web服务协议访问一个基于nettcp的WCF服务 在编写一个请求并尝试发送它之后,我得到了以下错误。它在WPF客户端上运行正常,但在LR VuGen脚本中失败 Action.c(16): Error:The socket connection was aborted. This could be caused by an error processing your message or a receive timeout

通过导入服务的WSDL,我正在使用LR VuGen 12.02和Web服务协议访问一个基于nettcp的WCF服务

在编写一个请求并尝试发送它之后,我得到了以下错误。它在WPF客户端上运行正常,但在LR VuGen脚本中失败

    Action.c(16): Error:The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:59:59.9949990'. 
Error: An existing connection was forcibly closed by the remote host 

Server stack trace: 
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
   at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   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.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at HP.WcfRouter.IUniversalContract.Send(Message message)
   at HP.WcfRouter.WcfRouter.DoRequestInternal(Boolean isOneWay, Dictionary`2 context)
Action.c(16): Error:InvokeMethod failure: External component has thrown an exception..
Action.c(16): Error:ExtractResultArg failure: Object reference not set to an instance of an object..
Action.c(16): Error:Web service call "GetTopicsByUserID" execution failed
我尝试了许多相关的建议,但没有成功 供参考: 在StackOverflow上还有更多这样的帖子,比如


非常感谢您的帮助。

Web服务只适用于HTTP绑定,而不适用于NetTCP绑定。对于NetTCP绑定,方法是在visualstudio中使用虚拟用户。使用您的客户机源构建一个shell来传递您的请求。您仍然可以从Visual Studio内部访问参数化引擎和运行时设置

Hi@James,非常感谢您的快速回复。但我对这个答案有点困惑。由于我们在LR>管理服务>协议与安全>编辑数据>WCF自定义绑定>传输=TCP中进行了设置,因此此设置不是通过TCP而不是HTTP发送Web服务请求,并且此TCP与Microsoft通过添加WCF.net TCP自定义的net.TCP相同吗?如果我在任何地方出错,请更正:)NetTCP绑定适用于Windows服务。HTTP绑定用于Web服务。如果使用NetTCP,则路径是通过VisualStudio虚拟用户生成负载。我的理解是,没有通过web或web服务处理NetTCP绑定的路径。如果希望通过HTTP发布服务,则存在使用HTTP接口进行测试的路径。这是我两周前和一位客户走的路,现在我更清楚了。再次感谢。:)我正在开发的应用程序是一个WPF应用程序,其中包含一个Web服务(HTTP)和一个WCF Windows服务(通过nettcp和公开的WSDL),我需要生成负载并强调这两个应用程序。我很容易在基于HTTP的Web服务上生成负载,但另一个基于nettcp的服务是有问题的。最初,我试图为C++的C类服务包编写一个C++包装类,并使用LRYLoad Sydll加载它们,但事实证明它们太复杂了。请提供任何替代方案。请查看Visual Studio加载项,从DLL中获取代码并将其放入实际的虚拟用户中。从LoadRunner第5版开始,它就可以工作,并且是一个经过验证的解决方案。。很抱歉延迟回复,但我使用的是Visual Studio 2015,我们的应用程序也将以.net 4.5.2为目标构建。Load Runner的加载项与VS2015不兼容,它们仅支持VS 2012。惠普可能还没有更新它们。我一直在对我尝试使用的服务类型进行深入分析,并从开发人员那里发现,他们正在使用nettcp,通过激活HTTPGetEnabled标志进行回调,因此我能够在IE/Chrome中浏览服务,但SOAP UI无法识别其中的WSDL导入操作