Daniel Little Coding Blog
Daniel Little Coding Blog

A blog about .net development and the web.

Daniel Little
Author

Daniel Little (lavinski) is a Brisbane based software developer.

Share


Our Newsletter


Like this blog? Get each new post as soon it's posted.

Tags


Twitter


IIS Background Thread Abort Exception

Daniel LittleDaniel Little

One of my applications creates a background thread on startup which executes a series of tasks at a regular interval. However I get a ThreadAbortException after my application pool is recycled.

The problem is simply IIS is aborting my thread and my application is not handling it well. I found the solution in this Stack Overflow question. You have to tell your thread to stop via the Application_End method in Global.asax.cs which gets called when the application is recycled.

Daniel Little
Author

Daniel Little

Daniel Little (lavinski) is a Brisbane based software developer.

Comments