1

There is a code which read components. The code is working fine for small number of components. But when large number of components have to be proceed, such as 1000, there is following error

Error getting component with tcmURI=tcm:21-1017 ---> System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Net.ConnectStream.WriteHeaders(Boolean async)
   at System.Net.HttpWebRequest.EndSubmitRequest()
   at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.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)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Tridion.ContentManager.CoreService.Client.ICoreService.Read(String id, ReadOptions readOptions)
   at Tridion.CoreServiceConnector.Utility.TridionConnector.GetComponent(String tcmUri) in CoreServiceConnector\Utility\TridionConnector.cs:line 102
   at Tridion.CoreServiceHelpers.Helpers.CoreServiceHelper.GetComponent(String tcmUri) in CoreServiceHelpers\Helpers\CoreServiceHelper.cs:line 115

it is strange because when same action is performed from Visual Studio and through test method, everything is ok. But when it is part of GUI Extension it shows this error.

Communication with Core service is established using CoreServiceClient and BasicHttpBinding.

Any idea?

Thanks.

  • Share the code being written for GetComponent method – Siva Charan Sep 12 '16 at 15:16
  • 1
    It is simple way coreServiceClient.Read("tcmId", ReadOptions) as Component – Ljiljana Eric Sep 12 '16 at 15:20
  • I'm sure there's way to increase the UI timeout, but I would rather recommend to add resilience to your code - like make sure if a call to CoreService fails that you check the connection status and re-initiate the client. – Nuno Linhares Sep 12 '16 at 18:25
  • 2
    It is not related to Tridion Core Services at all. It is related to GUI extension which is made as Web Application so timeout on application caused this. The problem is solved by adding in web.config <system.web> <httpRuntime executionTimeout="10000" /> </system.web> – Ljiljana Eric Sep 13 '16 at 8:11
  • 1
    This only delays how long until it fails, doesn't solve the problem. Wrapping it all on a try/catch and testing after failure is how I would address it. – Nuno Linhares Sep 13 '16 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.