Cannot start a Windows service written in .Net

Author Topic
Renukadevi Shanmugasundaram
Member

Joined: 14 Jul 2006
Country: Australia
Posts: 15

Posted: 18 Oct 2006 08:26:17

Hi all,

Actually i was looking for background process to deliver mails if certain condition met in database so i posted a question last week and got reply from one of our group member suggested me to go to Windows services and am really thankful to him.

Unfortunatly I never worked with windows services so i created a small service and installed it without any trouble. But i am not able to start it. When am trying to start its giving be alert box saying "This service has been started and stopped. Some service stop automatically if they have no work to do."

But i have created the service with timer to trigger every 30 sec to write an entry to a database table.

Looks like i cannot start the service at all. Also i tried to debug it but i could not find my service.exe in the list to attach since it is not running. {instead i found explorer.exe which is new and from the same path my service.exe exists. But physically explorer.exe is not existing in that folder)

please some one help me in fixing this. Am i missing something?

Thanks in advance
Renu

Hi all,

Actually i was looking for background process to deliver mails if certain condition met in database so i posted a question last week and got reply from one of our group member suggested me to go to Windows services and am really thankful to him.

Unfortunatly I never worked with windows services so i created a small service and installed it without any trouble. But i am not able to start it. When am trying to start its giving be alert box saying "This service has been started and stopped. Some service stop automatically if they have no work to do."

But i have created the service with timer to trigger every 30 sec to write an entry to a database table.

Looks like i cannot start the service at all. Also i tried to debug it but i could not find my service.exe in the list to attach since it is not running. {instead i found explorer.exe which is new and from the same path my service.exe exists. But physically explorer.exe is not existing in that folder)

please some one help me in fixing this. Am i missing something?

Thanks in advance
Renu
Renukadevi Shanmugasundaram
Member

Joined: 14 Jul 2006
Country: Australia
Posts: 15

Posted: 19 Oct 2006 05:10:24

Hi all,

I solved this problem with the help of other group members and like to share the solution in case someone need it.

I just added code to create new thread in my OnStart method. It helps the service stay running and avoid stopping without doing anything.

I hope this may be helpful to few entry level .Net programmers.

Cheers
Renu

Hi all,

I solved this problem with the help of other group members and like to share the solution in case someone need it.

I just added code to create new thread in my OnStart method. It helps the service stay running and avoid stopping without doing anything.

I hope this may be helpful to few entry level .Net programmers.

Cheers
Renu
gagan khurana
Member

Joined: 07 Dec 2006
Country: USA
Posts: 1

Posted: 06 Feb 2007 16:46:19

Hi Renu
I have the same requirement to send email reminder to people after checking from the database , if they didn't update their information. But i am not able to figure out how to do it. Can you please send me the code how you did that? I am new to window service development. Please help me its urgent. My email id is
Thanks
Gagan
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi all,

I solved this problem with the help of other group members and like to share the solution in case someone need it.

I just added code to create new thread in my OnStart method. It helps the service stay running and avoid stopping without doing anything.

I hope this may be helpful to few entry level .Net programmers.

Cheers
Renu
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hi Renu
I have the same requirement to send email reminder to people after checking from the database , if they didn't update their information. But i am not able to figure out how to do it. Can you please send me the code how you did that? I am new to window service development. Please help me its urgent. My email id is
Thanks
Gagan
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi all,

I solved this problem with the help of other group members and like to share the solution in case someone need it.

I just added code to create new thread in my OnStart method. It helps the service stay running and avoid stopping without doing anything.

I hope this may be helpful to few entry level .Net programmers.

Cheers
Renu
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency