faire part
New Member
On a webpage, I launche a parallel process to do a long running task then send an email to keep track of its "output".But the thread sometimes seems to end before sending the email (the email is the only track Ihave) and I think it might be related to a timeout.Here the code:\[code\]var thread = new Thread(() =>{ var cli = Factory.GetClient(callBack); FedDBService.ReturnMessage msg; try { msg = cli.SendFedCards(xmls.ToArray()); } catch (Exception exe) { msg = new FedDBService.ReturnMessage(); msg.Error = exe.Message; } finally { cli.Close(); completion.Finished = true; } message = String.Format(@"{0}Ended: {1: HH:mm} {2} {3}", message, DateTime.Now, msg.Error.Trim(' ', '\n', '\r', '\t') == "" ? "Withouth errors" : "With errors:" , msg.Error); try { golf.classes.Mailing.Mail.sendMail(Club.ClubEmail, email, null, "***@***.com", message, "**Subject**", false); // this method works right } finally { Thread.Sleep(5 * 60 * 1000); RemoveCompletion(guid); }});thread.Start();\[/code\]Do you think it's related to some timeout? And can I change it withouth allowing usual requests to run forever?