I have one windows service, which is invoked using commandline client C# application. The functionality of windows service is to execute some Batch jobs. In one of the Batch job, it calls an email service (WCF service) and send mail based on the values passed. It has one operation contract 'SendMail' with the signature as 'SendMail(object[][] parameters, string[] recipients)'. I am getting 'Thread was being aborted exception' after all the mails have been sent. But when I call the email service from console application, I did not receive any exception. I tried changes in configuration to increase timeout, but still the exception is occurring. I checked solution in the net, but I could not solve my problem yet. Can anyone have idea about the reason for this exception. Thanks in advance. The following is the stack trace of the exception which I received. Exception in sendmail : Thread was being aborted. Trace : at System.Net.ConnectStream.WriteHeaders(Boolean async) at System.Net.HttpWebRequest.EndSubmitRequest() at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at SampleBatchJob.EmailServiceRef.IService.SendMail(Object[][] parameters, String[] recipients) at SampleBatchJob.EmailServiceRef.ServiceClient.SendMail(Object[][] parameters, String[] recipients) in c:\Projects\BatchFramework\Arivazhagi\ACA.Batch5.0WC\Samples\SampleBatchJob\Service References\EmailServiceRef\Reference.cs:line 62 at Avanade.ACA.Batch.Batch.SampleBatchJob.EmailBatchJob.Execute(JobExecutionContext context) in c:\Projects\BatchFramework\Arivazhagi\ACA.Batch5.0WC\Samples\SampleBatchJob\EmailBatchJob.cs:line 71
Thankfully, jm