Ah yes, very fair for example.
In case, here is my OnStart procedure:
Code:
Protected Overrides Sub OnStart(ByVal args() as String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
JEvents.WriteEntry("Start Service")
Timer1.Enabled = True
Dim sr as New StreamReader(localDir & "ftpserver.txt")
siege = sr.Readline.split(";")
ftpServer = sr.Readline.split(";")
sr.Close()
sr.Dispose()
End Sub
You think I do too many things? I put the instructions that must be initialized at the beginning of the process. They do not change thereafter. Note that I could do at the beginning of the event timer ....
That saves me from having a restart the service if the content files are required to be changed (change ftp server for example).
What is the best way forward? For single services training, I followed a tutorial online that explains how to do a service check memory usage.
Bookmarks