Thread

Skip Navigation LinksForums > SpiraTest Forums > SpiraTest Issues & Questi... > Getting exceptions when e...

Getting exceptions when executing TestSet_Retrieve() function RSS Feed

Monday, August 11, 2014

Hi,

I'm running into some issues in regards to retrieving all of the available test sets. Seem like if I try to retrieve 400 test sets and above, I start getting exceptions. Is there something wrong with my HTTP binding? I have tried to change the parameters to no avail. Below is the method I execute and the exception:

public bool connect2SpiraServer()

        {

            spiraexport = new SpiraWebServices.ImportExportClient();

            BasicHttpBinding httpBinding = (BasicHttpBinding)spiraexport.Endpoint.Binding;

            httpBinding.AllowCookies = true;

            httpBinding.Security.Mode = BasicHttpSecurityMode.None;

            httpBinding.MaxReceivedMessageSize = 9999999; 

            httpBinding.ReceiveTimeout = new TimeSpan(0, 10, 0);

            httpBinding.SendTimeout = new TimeSpan(0, 1, 0);

            httpBinding.CloseTimeout = new TimeSpan(0, 1, 0);

            httpBinding.OpenTimeout = new TimeSpan(0, 1, 0);

            httpBinding.BypassProxyOnLocal = false;

            httpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;

            httpBinding.MaxBufferSize = 9999999;

            httpBinding.MaxBufferPoolSize = 9999999;

            httpBinding.TransferMode = TransferMode.Buffered;

            Boolean connectToServer = spiraexport.Connection_Authenticate(username, password);

               …

    testSets = spiraexport.TestSet_Retrieve(null, 1, 400);

        }


Exception:

"An error occurred while receiving the HTTP response to http://usmaspiraweb/SpiraTeam/Services/v4_0/ImportExport.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."

Inner Exception:

“The underlying connection was closed: An unexpected error occurred on a receive.”

“Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.”

Server stack trace:

   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)

   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

   at System.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.Invoke(IMessage message)

Exception rethrown at [0]:

2 Replies
Jim R.Jim R.
re: Dmitri Golubovski on Monday, August 11, 2014
Tuesday, August 19, 2014
Hi Dmitri

This error message often means that the size of the data packet being return is larger than the maximum allowed in your request.
So, either increase the size of httpBinding.MaxReceivedMessageSize (to Int32.Max) or reduce the pagination size of the request.

Regards
Jim
Dmitri GolubovskiDmitri Golubovski
re: Jim R. on Tuesday, August 19, 2014
Friday, August 22, 2014
HI,

I have tried increasing the MaxReceivedMessageSize with no success, still get the same exception. How would I go about reducing the pagination size of the request? If there is any documentation regarding retrieval of large number of TestCases or TestSets, I would definitely appreciate a reference to it. 
Tagged
Statistics
  • Started: 8/11/2014
  • Last Reply: 8/22/2014
  • Replies: 2
  • Views: 791
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.