Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows Service Stop working

Windows Service Stop working

Scheduled Pinned Locked Moved C#
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shajeel
    wrote on last edited by
    #1

    Hi I have a windows service which starts with windows and i have added a timer which restarts it after 3 minutes, to follow how it is working i have logged it completely by writing it in a certain file, it usually runs fine, but for once it stop logging and also stopped working, it appears on task manager and in services window it appears as running, last log entry in before starting the timer but after that timers tick event never called, can any one think of a reason why timer event lost. Regards Shajeel

    T 1 Reply Last reply
    0
    • S Shajeel

      Hi I have a windows service which starts with windows and i have added a timer which restarts it after 3 minutes, to follow how it is working i have logged it completely by writing it in a certain file, it usually runs fine, but for once it stop logging and also stopped working, it appears on task manager and in services window it appears as running, last log entry in before starting the timer but after that timers tick event never called, can any one think of a reason why timer event lost. Regards Shajeel

      T Offline
      T Offline
      Tehnoon
      wrote on last edited by
      #2

      I ran into this problem once, and never got to solve it. It has something to do with a timer being used in a windows service which is running on Windows Server 2003. What happens is that randomly, the timer events stop getting fired. I had to write my own timer then to get around this problem. By the way, some people do report that they got the problem solved by using the System.Threading.Timer class instead of System.Timers.Timer. So if you are using System.Timers.Timer, try using System.Threading.Timer first.

      S 1 Reply Last reply
      0
      • T Tehnoon

        I ran into this problem once, and never got to solve it. It has something to do with a timer being used in a windows service which is running on Windows Server 2003. What happens is that randomly, the timer events stop getting fired. I had to write my own timer then to get around this problem. By the way, some people do report that they got the problem solved by using the System.Threading.Timer class instead of System.Timers.Timer. So if you are using System.Timers.Timer, try using System.Threading.Timer first.

        S Offline
        S Offline
        Shajeel
        wrote on last edited by
        #3

        it happened with the service only one time, and service is running for some time in many boxes. i was just wondering what went wrong there. Regards Shajeel

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups