.NET Framework Developer Center >
.NET Development Forums
>
Network Class Library (System.Net)
>
MyApp has encountered a serious problem and needs to close
MyApp has encountered a serious problem and needs to close
- hey all...
i have simple smtp application which sends email every random time...
so it has to work for days continuously.....
so to achieve that .... i had to activate it (send emails) for a random period and deactivate it( sleep ) for also random period....
thus i used threading ( run, suspend, abort and sleep are all the function i used in threading)....
well after five or six hours windows gives this error that " Email application has encountered a serious problem and needs to close [send , don't send] "...
i don't know if this error messages is sort of exception cuz i'v never faced it before....
well it should be mentioned that the body of the emails is a word file that is saved as html.....
all the posts are appreciated and thanx in advance....
Answers
- Looks like you are getting an exception that is unhandled on your threads.
Wrap the code running in the threads that you start with a try/catch and log the exception that you get there. That will help figure out what is happening.
feroze
--
My blog
Instruction on how to create a tracelog with your System.Net application
- Marked As Answer byleopard-saleh Monday, October 26, 2009 9:44 AM
- exactly .... the problem was that visual studio was not installed and that caused that error....
so it solved by installing visual studio and configuring where the problem occurred ......
thanx guys.....- Marked As Answer byleopard-saleh Monday, October 26, 2009 9:49 AM
All Replies
- well ...it's worth to be mentioned that when the thread sleeps , it sleeps for a long period say 15 minutes( Thread.Sleep( 15 * 60 * 1000 ) ) .... does that make that effect(application crash) ????....
if so ... is there other better way to handle the thread ( sleeping , pausing and resuming ) that is safer ??
and thanx alot... - Looks like you are getting an exception that is unhandled on your threads.
Wrap the code running in the threads that you start with a try/catch and log the exception that you get there. That will help figure out what is happening.
feroze
--
My blog
Instruction on how to create a tracelog with your System.Net application
- Marked As Answer byleopard-saleh Monday, October 26, 2009 9:44 AM
Instead of sleeping a thread for a lengthy period of time, would it be possible to use a scheduled task instead? I don't think you would be able to do random intervals this way though.
- exactly .... the problem was that visual studio was not installed and that caused that error....
so it solved by installing visual studio and configuring where the problem occurred ......
thanx guys.....- Marked As Answer byleopard-saleh Monday, October 26, 2009 9:49 AM


