0

I'm hitting a nettcp based WCF Service using LR VuGen 12.02 and Web Services protocol by importing the WSDL of the Service.

After composing a request and trying to send it, I'm getting the following error. which actually works fine from the WPF Client but fails from the LR VuGen Script

    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

I have tried out many suggestions relevant but with no luck For your reference: Increasing Timeouts and maxItemsInObjectGraph and many more such posts on StackOverflow such as Socket Connection Aborted-StackOverflow post

Any help is deeply appreciated.

Community
  • 1
  • 1

1 Answers1

0

Web Services will only work for HTTP binding, not NetTCP binding. For NetTCP binding the way to go is with a virtual user in Visual Studio. Use your client source to build a shell to pass your request. You will still have access to the parameterization engine and run time settings from inside of Visual Studio

James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • Hi @James, Thanks a lot for your quick reply. But I'm a little confused here with this answer. As we have settings in LR>Manage Services>Protocol & Security>Edit Data>WCF Custom Bindings>Transport=TCP Doesn't this setting send the Web Service request over TCP instead of HTTP and this TCP is the same as net.TCP which Microsoft has customized by adding WCF .net TCP? Please correct me if I'm wrong anywhere :) – Murali Krishna Chaturvedi Sep 16 '15 at 13:32
  • NetTCP Binding is for Windows Services. HTTP Binding is for Web Services. If you use NetTCP your path is through a Visual Studio Virtual User to produce the load. My understanding is that there is no path through web or web services to handle the NetTCP binding. If you wish to publish the services across HTTP then a path exists to test using the HTTP interface. And that is a path I took with a client only two weeks ago. – James Pulley Sep 16 '15 at 14:08
  • Now it is bit more clear to me. Thanks again. :) The application that I'm working on is a WPF App with one Web Service(HTTP) and one WCF Windows Service(over nettcp with exposed WSDL) and I need to generate load and stress the both of them. I'm easily able to generate load on the HTTP based Web Services but the other nettcp based service is the problematic one. Initially I tried to write a C++ wrapper class for the C# DLLs of the service and load them using lr_load_dll but that has proved to be too complex I'm stuck up here. Please suggest any alternatives. – Murali Krishna Chaturvedi Sep 16 '15 at 14:29
  • Take a look at the Visual Studio addins to take the code from your DLL and place them into an actual virtual user. It works and is a tried and proven solution from LoadRunner version 5 onward – James Pulley Sep 17 '15 at 13:11
  • Hi again @James .. sorry for the delayed reply but I'm using Visual Studio 2015 with which our application is also being built to target .net 4.5.2. The addins for Load Runner are not compatible with VS2015 and they support only VS 2012. HP has not updated them perhaps. I have been doing deep dive analysis on the kind of Service that I'm trying to work with and found out that from the developers that they are using nettcp with call backs with a HTTPGetEnabled flag active due to which I'm able to browse the service in IE/Chrome but SOAP UI fails to identify the WSDL import operations inside it – Murali Krishna Chaturvedi Sep 29 '15 at 09:49
  • Then you have but two paths, turn to HP for 2015 extensions or have your developers leverage Visual Studio Ultimate Edition with the test framework to produce a load test for the NetTCP binding items. – James Pulley Sep 29 '15 at 13:15