IAdminServiceTEMP srvTmp = Core.ServiceModel.ChannelFactory.CreateChannel<IAdminServiceTEMP>(); Task<GenericResponse<BTCH_DETLInfo>>.Factory.FromAsync(srvTmp.BeginReadContractBatchData, srvTmp.EndReadContractBatchData, request, TaskCreationOptions.None) .ContinueWith(resp => { if (resp != null) { cmsBatchDetail = resp.Result.ResultSet; } }).Wait(); //Bellow code for close channel take lot of time for closing current Channel; Core.ServiceModel.ChannelFactory.CloseChannel();
//Code for closing channel IClientChannel channel = m_channel[factoryNme] as IClientChannel; if (channel == null) return; try { if (channel.State == CommunicationState.Faulted) { channel.Abort(); } channel.Close(); } catch { channel.Abort(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)