locked
windows service RRS feed

  • Question

  • Hello all,

    i have my windows service i develop it to send emails every 15 minutes

    i installed it in my machine and it run correctly

    but when i tried to install in another machine, it doesn't word even it doesn't write any thing in event log file and have 1061 error when it try to stop it.

    please help

    thanks and regards,

    Mohammed Fawzy


    Thursday, September 20, 2012 3:21 PM

All replies

  • Error 1061 means that the process can not be stopped because

    1) It has not completely started, or

    2) It is already stopped.

    Perhaps your initialization code never completed. Since your service is network-related, it could be waiting for a DNS query, etc. if the network is not configured properly.

    If this does not help, you should probably ask your question on a different forum such as Visual C++ General.

    Saturday, September 22, 2012 2:54 AM
  • It is sometimes a good idea to wrap the bulk of the service in a windows application that you can execute in the context of the current user, and get visual feedback like errors or crashes.

    I have worked on a similar application in the past, and if you don't have proper exception logging, you are completely in the dark as to what went wrong.

    You can try to log the exception in a database, and if that fails in a text log file, or even the event log. Try to write to more than one output if you have to, but get the error message.

    You can even write a separate test application (small console app) just to check if the code you use to write to the event log is actually working, else you are getting an exception WHILE handling the first exception?

    Thursday, October 11, 2012 6:50 PM