Long running web service call ends with ThreadAbortException

Discussion in 'ASP .Net Web Services' started by Mads Nielsen, Jan 11, 2008.

  1. Mads Nielsen

    Mads Nielsen Guest

    Hi,

    I get a ThreadAbortException when clients call a long running operation of
    one of my web services.

    I am unable to determine the cause of this.

    The web service method compiles C# code in a SQL Server database to DLL
    files, and runs for about 1-2 minutes before the exception occurs.

    Any help on how to avoid the exception would be most welcome.

    Best Regards,
    Mads Nielsen
     
    Mads Nielsen, Jan 11, 2008
    #1
    1. Advertising

  2. Hi Mads,

    From your description, I understand you often get "ThreadAbortException" in
    your .NET client app which calls some long-run server-side webservice,
    correct?

    Based on my experience, such problem is likely caused by the server-side
    service method exceed the runtime execution timeout scope. If you can
    reach and adjust the server-side service, I suggest you try enlarge the
    "executionTimeout" in <httpRuntime> setting to see whether it helps:

    #httpRuntime Element (ASP.NET Settings Schema)
    http://msdn2.microsoft.com/en-us/library/e1f13641.aspx

    Here is a former thread that also discussing on this:

    #ThreadAbortException & executionTimeout
    http://www.thescripts.com/forum/thread467787.html

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.




    --------------------
    >From: =?Utf-8?B?TWFkcyBOaWVsc2Vu?= <>
    >Subject: Long running web service call ends with ThreadAbortException
    >Date: Fri, 11 Jan 2008 04:08:01 -0800


    >
    >Hi,
    >
    >I get a ThreadAbortException when clients call a long running operation of
    >one of my web services.
    >
    >I am unable to determine the cause of this.
    >
    >The web service method compiles C# code in a SQL Server database to DLL
    >files, and runs for about 1-2 minutes before the exception occurs.
    >
    >Any help on how to avoid the exception would be most welcome.
    >
    >Best Regards,
    >Mads Nielsen
    >
     
    Steven Cheng[MSFT], Jan 14, 2008
    #2
    1. Advertising

  3. Mads Nielsen

    Mads Nielsen Guest

    Thanks for replying; unfortunately your solution does not alleviate the
    problem. I have tried using the ExecutionTimeout attribute before during my
    search for a solution, but tried once more, after reading your reply, just to
    be sure, and I still get the ThreadAbortException.

    I have tried to do remote debugging of the web service in order to find the
    part where it breaks down, but (sadly) the problem goes away while doing so.

    "Steven Cheng[MSFT]" wrote:

    > Hi Mads,
    >
    > From your description, I understand you often get "ThreadAbortException" in
    > your .NET client app which calls some long-run server-side webservice,
    > correct?
    >
    > Based on my experience, such problem is likely caused by the server-side
    > service method exceed the runtime execution timeout scope. If you can
    > reach and adjust the server-side service, I suggest you try enlarge the
    > "executionTimeout" in <httpRuntime> setting to see whether it helps:
    >
    > #httpRuntime Element (ASP.NET Settings Schema)
    > http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
    >
    > Here is a former thread that also discussing on this:
    >
    > #ThreadAbortException & executionTimeout
    > http://www.thescripts.com/forum/thread467787.html
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    >
    > ==================================================
    >
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    > ications.
    >
    >
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/subscriptions/support/default.aspx.
    >
    > ==================================================
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    >
    >
    > --------------------
    > >From: =?Utf-8?B?TWFkcyBOaWVsc2Vu?= <>
    > >Subject: Long running web service call ends with ThreadAbortException
    > >Date: Fri, 11 Jan 2008 04:08:01 -0800

    >
    > >
    > >Hi,
    > >
    > >I get a ThreadAbortException when clients call a long running operation of
    > >one of my web services.
    > >
    > >I am unable to determine the cause of this.
    > >
    > >The web service method compiles C# code in a SQL Server database to DLL
    > >files, and runs for about 1-2 minutes before the exception occurs.
    > >
    > >Any help on how to avoid the exception would be most welcome.
    > >
    > >Best Regards,
    > >Mads Nielsen
    > >

    >
    >
     
    Mads Nielsen, Jan 14, 2008
    #3
  4. Thanks for your reply Mads,

    I'm sorry to hear that. Yes, the httpruntime executionTimeout is a common
    issue. As you said enlarge the timeout not work, have you verified that the
    server webservice's <compilation debug ...> as been set to "false"(the
    executionTimeout setting is ignored under debug mode)

    Also, whether some other code in the service call that will raise timeout
    errror? You can try creating a simplified webservice method(which just use
    Thread.Sleep to simulate a long run task) and call it in client to see
    whether it will result to the same error behavior.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    >From: =?Utf-8?B?TWFkcyBOaWVsc2Vu?= <>
    >Subject: RE: Long running web service call ends with ThreadAbortException
    >Date: Sun, 13 Jan 2008 23:11:00 -0800


    >
    >Thanks for replying; unfortunately your solution does not alleviate the
    >problem. I have tried using the ExecutionTimeout attribute before during

    my
    >search for a solution, but tried once more, after reading your reply, just

    to
    >be sure, and I still get the ThreadAbortException.
    >
    >I have tried to do remote debugging of the web service in order to find

    the
    >part where it breaks down, but (sadly) the problem goes away while doing

    so.
    >
    >"Steven Cheng[MSFT]" wrote:
    >
    >> Hi Mads,
    >>
    >> From your description, I understand you often get "ThreadAbortException"

    in
    >> your .NET client app which calls some long-run server-side webservice,
    >> correct?
    >>
    >> Based on my experience, such problem is likely caused by the server-side
    >> service method exceed the runtime execution timeout scope. If you can
    >> reach and adjust the server-side service, I suggest you try enlarge the
    >> "executionTimeout" in <httpRuntime> setting to see whether it helps:
    >>
    >> #httpRuntime Element (ASP.NET Settings Schema)
    >> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
    >>
    >> Here is a former thread that also discussing on this:
    >>
    >> #ThreadAbortException & executionTimeout
    >> http://www.thescripts.com/forum/thread467787.html
    >>
    >> Sincerely,
    >>
    >> Steven Cheng
    >>
    >> Microsoft MSDN Online Support Lead
    >>
    >>
     
    Steven Cheng[MSFT], Jan 16, 2008
    #4
  5. Hi Mads,

    Have you got any progress on this issue? If there is anything else we can
    help, welcome to post here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    >From: (Steven Cheng[MSFT])
    >Organization: Microsoft
    >Date: Wed, 16 Jan 2008 03:13:01 GMT
    >Subject: RE: Long running web service call ends with ThreadAbortException


    >
    >Thanks for your reply Mads,
    >
    >I'm sorry to hear that. Yes, the httpruntime executionTimeout is a common
    >issue. As you said enlarge the timeout not work, have you verified that

    the
    >server webservice's <compilation debug ...> as been set to "false"(the
    >executionTimeout setting is ignored under debug mode)
    >
    >Also, whether some other code in the service call that will raise timeout
    >errror? You can try creating a simplified webservice method(which just

    use
    >Thread.Sleep to simulate a long run task) and call it in client to see
    >whether it will result to the same error behavior.
    >
    >Sincerely,
    >
    >Steven Cheng
    >
    >Microsoft MSDN Online Support Lead
    >
    >
    >This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >--------------------
    >>From: =?Utf-8?B?TWFkcyBOaWVsc2Vu?= <>
    >>Subject: RE: Long running web service call ends with ThreadAbortException
    >>Date: Sun, 13 Jan 2008 23:11:00 -0800

    >
    >>
    >>Thanks for replying; unfortunately your solution does not alleviate the
    >>problem. I have tried using the ExecutionTimeout attribute before during

    >my
    >>search for a solution, but tried once more, after reading your reply,

    just
    >to
    >>be sure, and I still get the ThreadAbortException.
    >>
    >>I have tried to do remote debugging of the web service in order to find

    >the
    >>part where it breaks down, but (sadly) the problem goes away while doing

    >so.
    >>
    >>"Steven Cheng[MSFT]" wrote:
    >>
    >>> Hi Mads,
    >>>
    >>> From your description, I understand you often get

    "ThreadAbortException"
    >in
    >>> your .NET client app which calls some long-run server-side webservice,
    >>> correct?
    >>>
    >>> Based on my experience, such problem is likely caused by the

    server-side
    >>> service method exceed the runtime execution timeout scope. If you can
    >>> reach and adjust the server-side service, I suggest you try enlarge the
    >>> "executionTimeout" in <httpRuntime> setting to see whether it helps:
    >>>
    >>> #httpRuntime Element (ASP.NET Settings Schema)
    >>> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
    >>>
    >>> Here is a former thread that also discussing on this:
    >>>
    >>> #ThreadAbortException & executionTimeout
    >>> http://www.thescripts.com/forum/thread467787.html
    >>>
    >>> Sincerely,
    >>>
    >>> Steven Cheng
    >>>
    >>> Microsoft MSDN Online Support Lead
    >>>
    >>>

    >
    >
     
    Steven Cheng[MSFT], Jan 21, 2008
    #5
    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. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    684
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,198
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    482
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    808
    Peter Nilsson
    Jan 15, 2008
  5. veryhotsausage
    Replies:
    1
    Views:
    1,811
    veryhotsausage
    Jul 4, 2008
Loading...

Share This Page