Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 103699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:09:54+00:00 2026-05-11T01:09:54+00:00

I’m running an SQL query against a mainframe DB2 database using the OdbcDataReader class

  • 0

I’m running an SQL query against a mainframe DB2 database using the OdbcDataReader class and ExecuteReader() method. This code is in production and has been running fine for months.

The query normally takes 1-2 minutes to execute. This past Friday, the query encountered a ThreadAbortException. Below is the formatted stack trace. The ApplicationException in the trace is created in my catch block.

In case it is important, the query is run when a client calls a web service method. The web service is hosted in a Windows Service. The web service is hosted in a Windows Service using the soap.tcp protocol.

Any ideas why the TreadAbortException is happening?

Stack trace for 2 exception(s). Root cause at the top.

Exception 2: Thread was being aborted.
System.Threading.ThreadAbortException inside C:\WINDOWS\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll at System.Data.Common.UnsafeNativeMethods.SQLExecDirectW(OdbcStatementHandle StatementHandle, String StatementText, Int32 TextLength) at System.Data.Odbc.OdbcStatementHandle.ExecuteDirect(String commandText) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) at MyCompany.MyDatabase.GetFolioList(String sqlWhereClause)

Exception 1: Unable to retrieve the folio summary list where STAT_CD=’V’.
System.ApplicationException inside D:\Production\DBGateway\bin\MyDatabase.dll at MyCompany.MyDatabase.GetFolioList(String sqlWhereClause) at MyCompany.MyDatabase.<>c__DisplayClass18.b__17() at MyCompany.WebUtilities.WebServiceBase.WebMethodTemplate[T](String methodName, String exceptionFormat, WebMethodWorker1 Worker, StringFormatter1 FormatterMethod)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:09:55+00:00Added an answer on May 11, 2026 at 1:09 am

    Here is the answer to my own question.

    When hosting a web service, there is some process monitoring how long a web service call is taking. If a call is taking too long, then it is killed and a ThreadAbortException will occur. The timeout can be increased.

    For a WSE3 web service running outside of ASP.NET, e.g. hosted as soap.tcp (like mine), the configuration property is executionTimeoutInSeconds:

    <configuration>   <microsoft.web.services3>     <messaging>       <executionTimeoutInSeconds value='360' />     </messaging>   </microsoft.web.services3> </configuration> 

    For a web service hosted in ASP.NET, the configuration property is executionTimeout:

    <configuration> <system.web>             <httpRuntime executionTimeout=”360” />       </system.web> </configuration 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 57k
  • Answers 57k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer All approaches will have their drawbacks. Cookies may not be… May 11, 2026 at 8:31 am
  • added an answer function changeColor() { changeColorIncremental(0); } function changeColorIncremental(i) { var element… May 11, 2026 at 8:31 am
  • added an answer I understand your question differently from Eugene Morozov. Tell me… May 11, 2026 at 8:31 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.

      Related Questions

      No related questions found