Professional Web Applications Themes

ThreadAbortException: Thread was aborted exception??? - ASP.NET Web Services

I've got a WebServices application that uses Crystal Reports to produce and then export Invoices to PDF format. Without getting into too many details, it's just a big loop statement that goes out to SQL using a SqlDataAdapter, brings back a dataset which is pushed into the Crystal Report, and the report is exported - nothing fancy. Everything works great in that on my development machine, I can run through 2,000 reports without hitting any snags. But when we deploy and try to run the WebService on a production machine, it throws out a ThreadAbortExceptions at random times. The exception ...

  1. #1

    Default ThreadAbortException: Thread was aborted exception???

    I've got a WebServices application that uses Crystal Reports to produce and
    then export Invoices to PDF format. Without getting into too many details,
    it's just a big loop statement that goes out to SQL using a SqlDataAdapter,
    brings back a dataset which is pushed into the Crystal Report, and the
    report is exported - nothing fancy.



    Everything works great in that on my development machine, I can run through
    2,000 reports without hitting any snags. But when we deploy and try to run
    the WebService on a production machine, it throws out a
    ThreadAbortExceptions at random times. The exception does not get raised at
    one particular line of code or at any predicable interval within the loop -
    it's very random, although it's almost always thrown once within the first
    15 reports, and then the remaining 1,875 or so run without raising the
    exception again.



    The only significant difference that I can point to between my development
    machine and the production machine is that the production machine is a
    dual-processor Xeon, while my dev machine is a lowly single processor -
    could that have anything to do with it? Please know too that my code does
    nothing with threads - I just run one long process in the existing thread.
    It seems that the Exception is either being thrown from the Crystal Engine,
    or from the SqlClient library as it retrieves the data - and actually I've
    seen evidence that it's throwing from both.



    In any case, if anybody has any ideas on this, please let me know.



    Thanks,

    Chris


    Christopher D. Wiederspan Guest

  2. #2

    Default ThreadAbortException: Thread was aborted exception???

    I've got a WebServices application that uses Crystal Reports to produce and
    then export Invoices to PDF format. Without getting into too many details,
    it's just a big loop statement that goes out to SQL using a SqlDataAdapter,
    brings back a dataset which is pushed into the Crystal Report, and the
    report is exported - nothing fancy.



    Everything works great in that on my development machine, I can run through
    2,000 reports without hitting any snags. But when we deploy and try to run
    the WebService on a production machine, it throws out a
    ThreadAbortExceptions at random times. The exception does not get raised at
    one particular line of code or at any predicable interval within the loop -
    it's very random, although it's almost always thrown once within the first
    15 reports, and then the remaining 1,875 or so run without raising the
    exception again.



    The only significant difference that I can point to between my development
    machine and the production machine is that the production machine is a
    dual-processor Xeon, while my dev machine is a lowly single processor -
    could that have anything to do with it? Please know too that my code does
    nothing with threads - I just run one long process in the existing thread.
    It seems that the Exception is either being thrown from the Crystal Engine,
    or from the SqlClient library as it retrieves the data - and actually I've
    seen evidence that it's throwing from both.



    In any case, if anybody has any ideas on this, please let me know.



    Thanks,

    Chris


    Christopher D. Wiederspan Guest

  3. #3

    Default RE: ThreadAbortException: Thread was aborted exception???

    Hi Christopher,

    I searched through out internal database and didn't find any similar
    problem yet. However I still have some suggestions for you.

    Firstly please install all the latest version of software, such as OS
    service packs, .NET framework 1.1.

    Second, is it possible for you to test it on another single CPU machine to
    see if the problem exists? If it still exists, I suggest you contact
    Microsoft 1:1 support service. You could use one of the support incidents
    included with your MSDN subscription and create a standard support incident
    to address the problem. They may setup a same environment to reproduce the
    problem or connect to your machine to check the problem. If this is indeed
    a bug, there the incident will not be used up by the call.

    Thanks very much for your understanding. Please get back to me and let me
    know if you have any more concerns.

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! C [url]www.microsoft.com/security[/url]
    This posting is provided as is with no warranties and confers no rights.


    Tian Min Huang Guest

  4. #4

    Default Re: ThreadAbortException: Thread was aborted exception???

    Are you redirecting or transfering from one page to another? That gets
    executed on another thread. Thread Abort exceptions 'cant be caught'. You
    can catch them but the CLR immediately rethrows it.

    You've violated a rule of thumbs here. If you are developing for a dual
    processor, you absolutely must test on a dual processor to catch concurrency
    and synchronization issues.

    If this is not possible (and it often is not due to company beaurocracy),
    you need to remote attach the debugger to the server process. MSDN tells you
    how to do this. Then set your exceptions (off of the debug menu) to break
    into the debugger on CLR exceptions.

    Fire the application up. When the thread exception occurs it will stop at
    the offending line. If it is coming from a module that you don't have soure
    code for, you are out of luck.

    hth
    "Christopher D. Wiederspan" <wiederspannetquote.com> wrote in message
    news:#0L#yM7SDHA.2120TK2MSFTNGP11.phx.gbl...
    > I've got a WebServices application that uses Crystal Reports to produce
    and
    > then export Invoices to PDF format. Without getting into too many details,
    > it's just a big loop statement that goes out to SQL using a
    SqlDataAdapter,
    > brings back a dataset which is pushed into the Crystal Report, and the
    > report is exported - nothing fancy.
    >
    >
    >
    > Everything works great in that on my development machine, I can run
    through
    > 2,000 reports without hitting any snags. But when we deploy and try to run
    > the WebService on a production machine, it throws out a
    > ThreadAbortExceptions at random times. The exception does not get raised
    at
    > one particular line of code or at any predicable interval within the
    loop -
    > it's very random, although it's almost always thrown once within the first
    > 15 reports, and then the remaining 1,875 or so run without raising the
    > exception again.
    >
    >
    >
    > The only significant difference that I can point to between my development
    > machine and the production machine is that the production machine is a
    > dual-processor Xeon, while my dev machine is a lowly single processor -
    > could that have anything to do with it? Please know too that my code does
    > nothing with threads - I just run one long process in the existing thread.
    > It seems that the Exception is either being thrown from the Crystal
    Engine,
    > or from the SqlClient library as it retrieves the data - and actually I've
    > seen evidence that it's throwing from both.
    >
    >
    >
    > In any case, if anybody has any ideas on this, please let me know.
    >
    >
    >
    > Thanks,
    >
    > Chris
    >
    >

    Alvin Bruney Guest

  5. #5

    Default Re: ThreadAbortException: Thread was aborted exception???

    Are you redirecting or transfering from one page to another? That gets
    executed on another thread. Thread Abort exceptions 'cant be caught'. You
    can catch them but the CLR immediately rethrows it.

    You've violated a rule of thumbs here. If you are developing for a dual
    processor, you absolutely must test on a dual processor to catch concurrency
    and synchronization issues.

    If this is not possible (and it often is not due to company beaurocracy),
    you need to remote attach the debugger to the server process. MSDN tells you
    how to do this. Then set your exceptions (off of the debug menu) to break
    into the debugger on CLR exceptions.

    Fire the application up. When the thread exception occurs it will stop at
    the offending line. If it is coming from a module that you don't have soure
    code for, you are out of luck.

    hth
    "Christopher D. Wiederspan" <wiederspannetquote.com> wrote in message
    news:#0L#yM7SDHA.2120TK2MSFTNGP11.phx.gbl...
    > I've got a WebServices application that uses Crystal Reports to produce
    and
    > then export Invoices to PDF format. Without getting into too many details,
    > it's just a big loop statement that goes out to SQL using a
    SqlDataAdapter,
    > brings back a dataset which is pushed into the Crystal Report, and the
    > report is exported - nothing fancy.
    >
    >
    >
    > Everything works great in that on my development machine, I can run
    through
    > 2,000 reports without hitting any snags. But when we deploy and try to run
    > the WebService on a production machine, it throws out a
    > ThreadAbortExceptions at random times. The exception does not get raised
    at
    > one particular line of code or at any predicable interval within the
    loop -
    > it's very random, although it's almost always thrown once within the first
    > 15 reports, and then the remaining 1,875 or so run without raising the
    > exception again.
    >
    >
    >
    > The only significant difference that I can point to between my development
    > machine and the production machine is that the production machine is a
    > dual-processor Xeon, while my dev machine is a lowly single processor -
    > could that have anything to do with it? Please know too that my code does
    > nothing with threads - I just run one long process in the existing thread.
    > It seems that the Exception is either being thrown from the Crystal
    Engine,
    > or from the SqlClient library as it retrieves the data - and actually I've
    > seen evidence that it's throwing from both.
    >
    >
    >
    > In any case, if anybody has any ideas on this, please let me know.
    >
    >
    >
    > Thanks,
    >
    > Chris
    >
    >

    Alvin Bruney Guest

Similar Threads

  1. Replies: 0
    Last Post: January 9th, 09:15 AM
  2. Error: Thread was aborted from WaitForSingleObject
    By Rachit Agarwal via DotNetMonster.com in forum ASP.NET Web Services
    Replies: 0
    Last Post: March 31st, 12:36 PM
  3. Thread was being aborted
    By enahar in forum ASP.NET Security
    Replies: 3
    Last Post: March 8th, 01:43 AM
  4. ThreadAbortException
    By David in forum ASP.NET General
    Replies: 4
    Last Post: May 21st, 05:36 AM
  5. Replies: 0
    Last Post: July 18th, 09:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139