473,789 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

threads or asynchronous programming inside asp.net

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.
Nov 18 '05 #1
3 1206
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.

"Anders Both" <an********@hot mail.com> wrote in message
news:#s******** ******@tk2msftn gp13.phx.gbl...
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.

Nov 18 '05 #2

Yes, and thx.

But the problem is more during developing, and during devoloping I dont
catch all exception my self.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:#e******** ******@TK2MSFTN GP11.phx.gbl...
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.

"Anders Both" <an********@hot mail.com> wrote in message
news:#s******** ******@tk2msftn gp13.phx.gbl...
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.


Nov 18 '05 #3
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.

"Anders Both" <an********@hot mail.com> wrote in message
news:OE******** ******@TK2MSFTN GP11.phx.gbl...

Yes, and thx.

But the problem is more during developing, and during devoloping I dont
catch all exception my self.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:#e******** ******@TK2MSFTN GP11.phx.gbl...
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.

"Anders Both" <an********@hot mail.com> wrote in message
news:#s******** ******@tk2msftn gp13.phx.gbl...
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.



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
537
by: Bart Nessux | last post by:
Could someone explain the concept of threads and how I might use them in Python? I was a math major, not a CS major (theory instead of practice). Most of my programming knowledge has grown out of system administration and shell scripting, not professional software development. How could I make this script threaded, and why should I, how would it benefit me? The script already takes up 100% CPU resources, what would using threads gain for...
7
1747
by: Mark B | last post by:
Hi I was wondering if someone could help me with the syntax for some VB.Net ASPX code to: - Start 20 threads - End all threads after the sooner of 10 seconds or if all of the threads themselves have finished. BTW, each thread checks an email address for validity with www.aspnetmx.com.
8
2373
by: Mark B | last post by:
Hi I was wondering if someone could help me with the syntax for some VB.Net ASPX code to: - Start 20 threads - End all threads after the sooner of 10 seconds or if all of the threads themselves have finished. BTW, each thread checks an email address for validity with www.aspnetmx.com.
15
2609
by: Bryce K. Nielsen | last post by:
I have an object that starts a thread to do a "process". One of the steps inside this thread launches 12 other threads via a Delegate.BeginInvoke to process. After these 12 threads are launched, the main thread waits. At the completion of each subthread, the mainthread checks all 12 thread objects to see if they are done. If they are, raise an event that says we're done. So, it's kinda like this: ProcessThread - Creates a ProcessObject
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10412
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.