I am using WCF service in my Windows service in Onstart method my service call like this
try
{
using (BackupUtilityWcfService.BackupUtilityClient oBackupUtilityClient = new BackupUtilityWcfService.BackupUtilityClient())
{
oBackupUtilityClient.ReadSnapshotMsmq();
oBackupUtilityClient.ReadReplicationMsmq();
oBackupUtilityClient.ReadReplicationCompleteMsmq();
}
}
}
catch
{
}
But When I call my WCF service i get this Error
Service cannot be started. System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
Server stack trace: at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
What is wrong with this ?