You must Sign In to post a response.
  • Category: Windows

    Window Service not working properly


    I am creating a window service in which OnStart () time i am changing the system time on system restart. this service work fine on system restart
    My Problems
    1. but not working when i am proper shutdown the system and then start.
    2. I want this service run on operating system boot time not after user login time.
    3. i want to save system time on Sql Database table when my system is shutdown, logoff, restart or unexpected stop. I am also using OnStop() and OnShutdown() methods but these methods are not work properly.

    Please help me for solving above problems.
  • #763793
    Hai Gaurav,
    What issue you are facing? Is the windows service not ale to save the log off time of the system? I think before going to logoff, the service will get stopped so it cant calculate the actual logoff time for the system.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #763796
    I found the problem, my sql browser stop first thats why my service is stopped and not saved data.

    How i can detect the sql browser is active/running or not. can u help me regarding this?

  • Sign In to post your comments