I've set up a windows service using a file system watcher and can't get it to run.
It hangs up on the following:
It writes the first log entry but nothing afterwards so I know it isn't getting past the WaitForChanged property setting.
I'm not getting any errors in the event log.
Does anyone have any ideas?
It hangs up on the following:
Code:
'Set the file properties the file system watcher uses to detect
'changes to files
Try
Me.EventLog.WriteEntry("Set wait for changed")
Me.FileSystemWatcher1.WaitForChanged(IO.WatcherChangeTypes.Created)
Catch ex As Exception
'Write the error to the event log
Me.EventLog.WriteEntry( _
"Could not set the wait for changed. Error was: " & _
ex.Message, System.Diagnostics.EventLogEntryType.Error, 1, _
CType(1, Short))
End Try
It writes the first log entry but nothing afterwards so I know it isn't getting past the WaitForChanged property setting.
I'm not getting any errors in the event log.
Does anyone have any ideas?