Hi everyone-

I am trying to write a fairly simple VB.NET service (use a timer to poll a network location for a file, if file exists, send message).

The service correctly start, stops, runs the timer, etc. I can tell this from a custom event log I created, and it adds new entries on start, stop, and each time the timer expires.

FYI...since this is my first service to write, I'm going by a MSDN article I found on the subject.

OK, back to topic...when I try to start my service (My Computer --> Manage --> Services & Applications --> Services --> Right-click my service and click "Start"), the progress bar window that appears never completely finishes. I loads the first 50% or so just fine, then does the rest VERY slowly, and never closes. However, if I click "Close", my service status says "Starting", but it is writing entries to the event log as the timer expires, so it is running.

Is there something in my code I'm doing wrong that makes it think it never finished loading the service (although it did)?

Thanks in advance-


Code:
    Protected Overrides Sub OnStart(ByVal args() As String)

        logMain.WriteEntry("Service started.", EventLogEntryType.Information)

        ' Setup timer
        timeQuery.AutoReset = True
        ' Set for testing.  Increase time for deployment.
        timeQuery.Interval = 6000

        ' Start timer
        timeQuery.Start()

    End Sub