WCF Communication error occurs randomly and imposs

2019-08-06 11:22发布

问题:

I have an application that use WCF as communication interface. Some time, the client call the ServiceHost and got that error:

This channel can no longer be used to send messages as the output session was auto-closed due to a server-initiated shutdown. Either disable auto-close by setting the DispatchRuntime.AutomaticInputSessionShutdown to false, or consider modifying the shutdown protocol with the remote server.

I am a little bit out of solution after 1 month of research.

I think that the serviceHost go an timeout and the exception isn't handled. That make my serviceHost close. So the message is not the dirrect cause of the problem and i have no idea how to debug or handle error from WCF ServiceHost