G
Guest
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 starts, 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...sice this is my first service to write, I'm going by the MSDN article at http://msdn.microsoft.com/library/d...lkthroughcreatingwindowsserviceapplication.as
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
Protected Overrides Sub OnStart(ByVal args() As String
logMain.WriteEntry("Service started.", EventLogEntryType.Information
' Setup time
timeQuery.AutoReset = Tru
' Set for testing. Increase time for deployment
timeQuery.Interval = 600
' Start time
timeQuery.Start(
End Su
PS - If you think this should be or would get more responses in a different topic, please let me know..
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 starts, 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...sice this is my first service to write, I'm going by the MSDN article at http://msdn.microsoft.com/library/d...lkthroughcreatingwindowsserviceapplication.as
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
Protected Overrides Sub OnStart(ByVal args() As String
logMain.WriteEntry("Service started.", EventLogEntryType.Information
' Setup time
timeQuery.AutoReset = Tru
' Set for testing. Increase time for deployment
timeQuery.Interval = 600
' Start time
timeQuery.Start(
End Su
PS - If you think this should be or would get more responses in a different topic, please let me know..