I am having an issue with WCF in .Net 4.5
My client application throws and error after 10 minutes. I have researched the web and have extended every timeout I could fine – with no luck.
My console application is designed to run on a local network. It performs calculations in excel sheets that can take hours to complete – therefore erroring after 10 minutes is not good.
To troubleshoot I have created a test host that uses the Sleep method for 10 minutes, it crashes each time. I am not sure how useful the content of the error is since it seems to be rather generic. Before I have my client call the host, I confirm the different timeout settings. Below is what the client shows:
CloseTimeout Hours: 23
CloseTimeout Minutes: 59
CloseTimeout Seconds: 59
OpenTimeout Hours: 23
OpenTimeout Minutes: 59
OpenTimeout Seconds: 59
ReceiveTimeout Hours: 23
ReceiveTimeout Minutes: 59
ReceiveTimeout Seconds: 59
SendTimeout Hours: 23
SendTimeout Minutes: 59
SendTimeout Seconds: 59
I have included the error from the client below, I am not sure how helpful this is. Also, the host application does not thrown an error message.
ERROR: An error occurred while receiving the HTTP response to http://localhost:8
rvice. This could be due to the service endp
oint binding not using the HTTP protocol. This could also be due to an HTTP requ
est context being aborted by the server (possibly due to the service shutting do
wn). See server logs for more details.
Unhandled Exception: System.ServiceModel.Securi
ception: An u
nsecured or incorrectly secured fault was received from the other party. See the
inner FaultException for the fault code and detail. ---> System.ServiceModel.Fa
ultException: The message could not be processed. This is most likely because th
e action 'http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel'
ct or because the message contains an invalid or expired security context token
or because there is a mismatch between bindings. The security context token woul
d be invalid if the service aborted the channel due to inactivity. To prevent th
e service from aborting idle sessions prematurely increase the Receive timeout o
n the service endpoint's binding.
--- End of inner exception stack trace ---
Server stack trace:
ontext requestContext, TimeSpan ti
Span timeout, SecurityProtocolCorrelatio
n timeout, Boolean& wasAborted)
Exception rethrown at :
Msg, IMessage retMsg)
ta, Int32 type)
String args) in d:\_dev\Distributor\