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

  • SEARCH
  • Home
  • 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 6997193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:15:10+00:00 2026-05-27T20:15:10+00:00

I have made an asp.net page which executes a long sp. lets say the

  • 0

I have made an asp.net page which executes a long sp.
lets say the the function that executes the sp is called Func1.

Ive met with that problem :

If i ran Func1 in the same thread ( normal execution), the apppool won’t recycle itself since he’s seeing it as a busy/working.

But if I execute Func1 in another thread – so the apppool recycle’s itself after the time that is set here :

enter image description here

My question is : why is that ?

is it true that if i run a command synchronously , so app is active and not eligible for apppool recycle ?
And if i create it in a new thread so it does eligible for apppool recycle ?

why is that ? Does the thread is less important then the main thread ?

  • 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. Editorial Team
    Editorial Team
    2026-05-27T20:15:11+00:00Added an answer on May 27, 2026 at 8:15 pm

    ASP.NET maintains a list of thread pool threads that it is using to service requests. It knows it can recycle the app domain when none of its threads are active.

    If you create a thread or use a thread pool thread without the knowledge of ASP.NET, it will not detect that your thread is active and may recycle.

    When it recycles, it unloads the AppDomain which causes a ThreadAbortException to be thrown on your thread.


    The normal solution to your requirements is to have a windows service that is controlled by the web app. This is obviously in a separate process and so is not affected by the web app recycling. However, this is a non-trivial exercise.

    The quick-and-dirty solution is to asynchronously start a web request from within your web app. The page that starts the operation can then return. The “hidden” page that was called can block until the SP has completed. As I said, this is a nasty-but-easy solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made a asp.net page that creates an Excel workbook. I have set the
I have a ASP.NET (C#) web page which utilizes a VB class library. The
I have an ASP.NET page that needs to make calls to multiple web services
I have a website made in Asp.net MVC which is installed in the root
I have a portfolio made in C#/ASP.NET which started off small but, as it
I have inherited some ASP.NET web code which I have made changes to. It
I have a GridView on an ASP.NET page that I'm trying to bind to
I have made an ASP.NET table which on runtime gets populated with labels, literals,
I have a ASP.net 2.0 app and I have made some changes the the
I have made a user control in asp.net c#. Becuase of some data I

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.