我有静态 WCF 客户端,但我仍然不明白如何重置/恢复它?
我的尝试之一:
if (Core.shed.State == CommunicationState.Faulted) {
Core.shed.Close();
Core.shed = new wcfClient();
}
没用,我还在
Cannot access a disposed object. Object name: 'System.ServiceModel.Channels.ServiceChannel'.
当我的 wcf 服务再次激活时,我应该如何重置它?