D
Daniel Knöpfel
Hi
I am develloping an asp.net 2.0 application. For some tasks (daily
notifications to users via email), we use background threads. I rather have
this task as background thread of the asp.net application and not as a
service as as the installation procedure of a service on the productive
system would cause a lot of administrative overhead.
The thread is started in the global.asax file on startup. Strangely, after
some time, the thread is being aborted with a ThreadAbortException,
(Message: Thread was being aborted) I do not see a logical reason for this.
Does asp.net or iis prevent prevent threads running in the background for a
long time? If yes, how can i change this? This is really crucial for the
task, that must be performed.
Thanks in advance for any help
Daniel
PS: code snippet on how the thread is started
public static void Application_Start(object sender, EventArgs e) {
notificationThread = new Thread(new ThreadStart(StartNotificationThread));
notificationThread.IsBackground = true;
notificationThread.Priority = ThreadPriority.Lowest;
notificationThread.Start();
I am develloping an asp.net 2.0 application. For some tasks (daily
notifications to users via email), we use background threads. I rather have
this task as background thread of the asp.net application and not as a
service as as the installation procedure of a service on the productive
system would cause a lot of administrative overhead.
The thread is started in the global.asax file on startup. Strangely, after
some time, the thread is being aborted with a ThreadAbortException,
(Message: Thread was being aborted) I do not see a logical reason for this.
Does asp.net or iis prevent prevent threads running in the background for a
long time? If yes, how can i change this? This is really crucial for the
task, that must be performed.
Thanks in advance for any help
Daniel
PS: code snippet on how the thread is started
public static void Application_Start(object sender, EventArgs e) {
notificationThread = new Thread(new ThreadStart(StartNotificationThread));
notificationThread.IsBackground = true;
notificationThread.Priority = ThreadPriority.Lowest;
notificationThread.Start();