Custom async httphandler... how to handle exceptions ?

S

Steve B.

Hi,

I've followed this howto :
http://msdn2.microsoft.com/en-us/library/ms227433.aspx in order to publish
images from a DB.

This is working correctly, but if an exception occured in the
StartAsyncTask, the whole w3wp.exe process hangs, and Dr Watson fires.

How can I correctly handle exceptions in the StartAsyncTask ?

private void StartAsyncTask(Object workItemState)
{
DoSomethingThatCanFail();
// if failure, the thread does not seems to callback
// the mail thread.. How can I "return" the exception ?

_completed = true;
_callback(this);
}


Thanks in advance,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top