Click here to Skip to main content
15,921,793 members
Home / Discussions / C#
   

C#

 
AnswerRe: Views Pin
Ashfield3-Jun-08 1:28
Ashfield3-Jun-08 1:28 
Questionreplace method Pin
kamalesh57433-Jun-08 0:02
kamalesh57433-Jun-08 0:02 
AnswerRe: replace method Pin
leppie3-Jun-08 0:58
leppie3-Jun-08 0:58 
GeneralRe: replace method Pin
kamalesh57433-Jun-08 1:32
kamalesh57433-Jun-08 1:32 
GeneralRe: replace method Pin
leppie3-Jun-08 1:42
leppie3-Jun-08 1:42 
QuestionMulticast Delegates and effect in C++ COM Server Pin
dtranter2-Jun-08 23:45
dtranter2-Jun-08 23:45 
QuestioniTextSharp : Select an item in a combobox in PDF file Pin
fady_sayegh2-Jun-08 23:33
fady_sayegh2-Jun-08 23:33 
QuestionCasting to inhering type from inherited type Pin
livez2-Jun-08 23:28
livez2-Jun-08 23:28 
AnswerRe: Casting to inhering type from inherited type Pin
leppie2-Jun-08 23:37
leppie2-Jun-08 23:37 
GeneralRe: Casting to inhering type from inherited type Pin
livez3-Jun-08 0:32
livez3-Jun-08 0:32 
General[Message Deleted] Pin
Jan Scamba3-Jun-08 0:52
Jan Scamba3-Jun-08 0:52 
GeneralRe: Casting to inhering type from inherited type Pin
livez3-Jun-08 1:14
livez3-Jun-08 1:14 
GeneralRe: Casting to inhering type from inherited type Pin
Jan Scamba3-Jun-08 1:22
Jan Scamba3-Jun-08 1:22 
GeneralRe: [Message Deleted] Pin
Scott Dorman3-Jun-08 3:04
professionalScott Dorman3-Jun-08 3:04 
GeneralRe: Casting to inhering type from inherited type Pin
leppie3-Jun-08 1:01
leppie3-Jun-08 1:01 
GeneralRe: Casting to inhering type from inherited type Pin
livez3-Jun-08 1:22
livez3-Jun-08 1:22 
GeneralRe: Casting to inhering type from inherited type Pin
leppie3-Jun-08 1:40
leppie3-Jun-08 1:40 
GeneralRe: Casting to inhering type from inherited type Pin
livez3-Jun-08 1:41
livez3-Jun-08 1:41 
GeneralRe: Casting to inhering type from inherited type PinPopular
leppie3-Jun-08 1:43
leppie3-Jun-08 1:43 
GeneralRe: Casting to inhering type from inherited type Pin
Colin Angus Mackay3-Jun-08 2:30
Colin Angus Mackay3-Jun-08 2:30 
GeneralRe: Casting to inhering type from inherited type Pin
leppie3-Jun-08 3:19
leppie3-Jun-08 3:19 
GeneralRe: Casting to inhering type from inherited type Pin
Colin Angus Mackay3-Jun-08 2:32
Colin Angus Mackay3-Jun-08 2:32 
GeneralRe: Casting to inhering type from inherited type Pin
livez3-Jun-08 3:55
livez3-Jun-08 3:55 
GeneralRe: Casting to inhering type from inherited type Pin
Russell Jones3-Jun-08 4:35
Russell Jones3-Jun-08 4:35 
QuestionService Starting Problem! Pin
backSlashZero2-Jun-08 22:47
backSlashZero2-Jun-08 22:47 
I have created a windows service to send email on daily basis. It has a timer object that fires an event after 24 hours,

private System.Timers.Timer timer = new System.Timers.Timer (86400000); 


In timer event I do my working i.e. I send my emails, something like this:

private void OnTimedEvent(object source, System.Timers.ElapsedEventArgs e) 
{
	eventLog1.WriteEntry("Calling web service for Sending Reminders on " + DateTime.Now.ToLongDateString());
	if (EmailObj.SendReminder()) // if sending email is sussful
	{
		eventLog1.WriteEntry("The operation was successfully completed on " + DateTime.Now.ToLongDateString());;
	}
	else
	{
		eventLog1.WriteEntry("There was some error, the operation failed on " + DateTime.Now.ToLongDateString());;
	}

	if (DateTime.Today.Day == 1)
	{
		// first date of month; send emails	
	}
}


The problem is, I have installed the service on Windows server 2003, but the service starts and stops immediately with the message

“The MyServiceName service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service”

I can see the event log entries that I did on OnStart event of the service; also the service is working fine on Windows XP.

Please help me I have to run this service on MS Windows server 2003 forever to send emails on daily basis,

cout << "\0";
// its backSlashZero

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.