Click here to Skip to main content
15,913,300 members
Home / Discussions / C#
   

C#

 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
dan!sh 16-Jan-10 23:57
professional dan!sh 16-Jan-10 23:57 
GeneralRe: Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server ‘\\.\pipe\3F103E6E-3FD4-47\tsql\query’ Pin
Mohammad Dayyan17-Jan-10 0:20
Mohammad Dayyan17-Jan-10 0:20 
Questionwriting a windows service Pin
benams16-Jan-10 20:26
benams16-Jan-10 20:26 
AnswerRe: writing a windows service Pin
dan!sh 16-Jan-10 20:59
professional dan!sh 16-Jan-10 20:59 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 3:25
professional#realJSOP17-Jan-10 3:25 
GeneralRe: writing a windows service Pin
PIEBALDconsult17-Jan-10 5:15
mvePIEBALDconsult17-Jan-10 5:15 
GeneralRe: writing a windows service Pin
dan!sh 17-Jan-10 6:10
professional dan!sh 17-Jan-10 6:10 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 7:19
professional#realJSOP17-Jan-10 7:19 
d@nish wrote:
I am not sure how I would employ threads for this. (Is it suspend/start kind of thing that you are referring).


Just use a BackgroundWorker that sits and spins. It can't wait more than 4 seconds before cycling (in a loop) because task manager will shut a windows service down that looks like its not active. It can be canceled, so there's no problem with running it in a service. I abhor the use of timers, and I view them with the same disdain I reserve for goto statements.


d@nish wrote:
IMHO when you are sending mails, you should not be expected to make it happen instantly. Reason being even though your code works perfect, there is always a chance of email server not being upright (unless you have your own and you guarantee it will always work). So a couple of seconds or even a minute or so should not trouble. I also believe that threads can actually mess up the whole application if not used sensibly and accurately. And IMHO when application goes live, only then one can check how well he has handled threads (just an opinion).


I don't understand your concern. Once an hour you send an email. Period. Whether or not the SMTP server is available and whether or not you even need to care depends on the environment. If the server isn't on your local domain, there's nothing you can do except send the email and hope for the best. It has nothing to do with the threading model you chose to implement the cycle.

.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

GeneralRe: writing a windows service Pin
Ravi Bhavnani17-Jan-10 9:33
professionalRavi Bhavnani17-Jan-10 9:33 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 23:52
professional#realJSOP17-Jan-10 23:52 
AnswerRe: writing a windows service Pin
PIEBALDconsult17-Jan-10 5:17
mvePIEBALDconsult17-Jan-10 5:17 
GeneralRe: writing a windows service Pin
#realJSOP17-Jan-10 7:20
professional#realJSOP17-Jan-10 7:20 
Questionsaving images in C# Pin
djsproject16-Jan-10 18:27
djsproject16-Jan-10 18:27 
AnswerRe: saving images in C# Pin
OriginalGriff16-Jan-10 21:35
mveOriginalGriff16-Jan-10 21:35 
QuestionSetWindowPos, MoveWindow and GetWindowRect screen handling issues Pin
Electric Eddy16-Jan-10 17:17
Electric Eddy16-Jan-10 17:17 
AnswerRe: SetWindowPos, MoveWindow and GetWindowRect screen handling issues Pin
#realJSOP17-Jan-10 3:27
professional#realJSOP17-Jan-10 3:27 
GeneralRe: SetWindowPos, MoveWindow and GetWindowRect screen handling issues Pin
Electric Eddy17-Jan-10 6:45
Electric Eddy17-Jan-10 6:45 
Questionadding data to combo box from menu item Pin
johnnysmith116-Jan-10 15:35
johnnysmith116-Jan-10 15:35 
AnswerRe: adding data to combo box from menu item Pin
DaveyM6916-Jan-10 16:15
professionalDaveyM6916-Jan-10 16:15 
GeneralRe: adding data to combo box from menu item Pin
johnnysmith116-Jan-10 16:19
johnnysmith116-Jan-10 16:19 
QuestionRetreiving next autonumber value Pin
tonyonlinux16-Jan-10 14:31
tonyonlinux16-Jan-10 14:31 
AnswerRe: Retreiving next autonumber value Pin
Luc Pattyn16-Jan-10 14:38
sitebuilderLuc Pattyn16-Jan-10 14:38 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux16-Jan-10 14:48
tonyonlinux16-Jan-10 14:48 
GeneralRe: Retreiving next autonumber value Pin
Dave Kreskowiak16-Jan-10 15:13
mveDave Kreskowiak16-Jan-10 15:13 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux16-Jan-10 15:34
tonyonlinux16-Jan-10 15:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.