Start Thread within WebService Request

Discussion in 'ASP .Net' started by Henrik Hofmann, Jun 3, 2009.

  1. Hi,

    I am starting a database job which takes a long time (5 hrs) by sending a
    request to a webservice.

    example:

    [WebMethod]
    public string StartJob()
    {

    //Create Thread ....

    thread.Start();

    return "JOB STARTED";


    }



    The webservice starts the thread and returns a message instantly to the
    user. After some time (about two hours) I receive a timeout exception from
    the webserver and the thread gets terminated. I believe this is the same
    timeout as the usual request timeout. How can I start a thread from within a
    request whithout being affected by any timeouts?

    Best regards,

    Henrik
     
    Henrik Hofmann, Jun 3, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. steven robinson
    Replies:
    0
    Views:
    671
    steven robinson
    Nov 9, 2003
  2. Enigma Curry
    Replies:
    1
    Views:
    508
    Peter Hansen
    Mar 15, 2006
  3. =?Utf-8?B?cGxleDRy?=
    Replies:
    0
    Views:
    366
    =?Utf-8?B?cGxleDRy?=
    Nov 13, 2007
  4. Replies:
    5
    Views:
    1,646
    Roedy Green
    Jun 20, 2008
  5. René Preußler

    Asynchronous Call of WebService method within a WebService

    René Preußler, Oct 29, 2008, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    206
    René Preußler
    Oct 29, 2008
Loading...

Share This Page