threads or asynchronous programming inside asp.net

A

Anders Both

Does someone know´s about using threads and/or asynchronous programming
inside asp.net (inside the asp.net process). I am here not speaking about
the thing that the IIS makes new threads for each request, but about
starting a thread inside the asp.net process.
I am making big use of this thing in my applikation, but I have the problem
that when exceptions/errors uccur no message is bein showed. When VS is
running a wery undetaild message shows up (no line number filename or
anything, just the name of the exception). When VS is not running no message
appears at all.
I hope someone have a good advice, or that maybe someone knows a place where
I can see some kind of detailed (event)log for all that is going on in the
asp.net process.

Best Regards
Anders Both, Denmark.
 
K

Kevin Spencer

There are any number of ways to accomplish what you want. First, you should
use structured exception handling in your code. When an exception occurs,
simply write the Exception message and optionally a Stack Trace to the
server's event log. Whatever else you want to do is up to you, but this will
at least give you an event log entry telling you what went wrong.

In addition, as the spawned threads have access to the class which spawned
them, you can set properties in the calling class when an exception occurs.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
A

Anders Both

Yes, and thx.

But the problem is more during developing, and during devoloping I dont
catch all exception my self.
 
K

Kevin Spencer

If you're talking about running in the debugger, it is true that the
debugger won't step into the child threads that are spawned. However, you
can put a breakpoint into the child thread's code, and the child thread will
break there.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top