forum

home / developersection / forums / asp.net kills my background thread?

ASP.NET kills my background thread?

Anonymous User 1799 17-Nov-2014

I have the following code in my codebehind (aspx.cs):

protected void button1_Click(object sender, EventArgs e)
{
    new Thread(delegate() {
        try
        {
            Thread.Sleep(30000); //do nothing for 30 seconds
        }
        catch (Exception ex)
        {
            //I AWLAYS get a ThreadAbortException here
            //in about 1 second WHY!?!??!
        }
    }).Start();
}

Please help me


Updated on 17-Nov-2014

I am a content writter !

Can you answer this question?

Answer

1 Answers

Liked By