Application works with Core Service to read tridion items and to calculate some stuff.
Core Service is configured to use wsHttp binding.
On one environment everything works fine. But on other environment same code fails when to much items are proceed by same class.
Error getting page for tcmUri=tcm:7-3073-64 ---> System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: The message could not be processed. This is most likely because the action 'http://www.sdltridion.com/ContentManager/CoreService/2012/ICoreService/Read' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding. --- End of inner exception stack trace --- Server stack trace: at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.ProcessReply(Message reply, TimeSpan timeout, SecurityProtocolCorrelationState correlationState) at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.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)
It is strange that sometimes error happens for page, sometimes for publication. it is not fixed code line when it will breaks.
Code is good and it works when it is only one page and few components on page are proceed, but in the case of 30 items, suddenly error is shown.
Connection to Core Service is still active before throwing the error.