1 Replies - 506 Views - Last Post: 05 January 2013 - 10:10 AM Rate Topic: -----

#1 bigdessert  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-January 13

Windows server 2012 Service wont start

Posted 05 January 2013 - 09:21 AM

Hello, I have code that has been working on windows 2000-2008 and xp-7 but for some reason on 2012 server the service fails to start. Here is the onstart code. Any ideas? Thanks in advance.

 Protected Overrides Sub onstart(ByVal args() As String)
        Dim now As Date = DateTime.Now
        Dim dueTime As Integer ' milliseconds to the next top of hour
        dueTime = 900000 - (now.Minute Mod 15) * 60000 - now.Second * 1000 - now.Millisecond
        Dim oCallback As New TimerCallback(AddressOf OnTimedEvent)
        oTimer = New System.Threading.Timer(oCallback, Nothing, dueTime, 900000)
        EventLogToMonitor("Application")
        EventLogToMonitor("Security")
        EventLogToMonitor("System")
        Dim myThreadDelegate As New ThreadStart(AddressOf OnTimedEvent)
        Dim myThread As New Thread(myThreadDelegate)
        myThread.Start()
    End Sub


Is This A Good Question/Topic? 0
  • +

Replies To: Windows server 2012 Service wont start

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1052
  • View blog
  • Posts: 4,077
  • Joined: 02-July 08

Re: Windows server 2012 Service wont start

Posted 05 January 2013 - 10:10 AM

Any chance one of the EventLogToMonitor may be crashing it. Try adding some error logging in that Sub.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1