Hello,
I am using the following code in my Global.asax.cs file:
public static readonly IMyCommunicationService GlobalCommunicationChannel =
new ChannelFactory<IMyCommunicationService>("NetTcpBinding_IMyCommunicationService").CreateChannel();
From every website I am accessing the static var "GlobalCommunicationChannel".
That is working very well so far. But sometimes, in production environment, I am getting an CommunicationObjectFaultedException. It says that I can not use my GlobalCommunicationChannel object as the object "System.ServiceModel.Channels.ServiceChannel" is in faulted-state.
I get no more information than that. After some minutes it is working again. Don't know why. I think the connection is re-established or something like that.
What causes this error?
Is there a way to avoid this error in future without adding a try/catch and a retry everywhere?
Thank you very much in advance for your answer!