Windows service starts then stops automatically

I have a solution in which there are three projects. One of them is a service, one of which is a form, and one is a class library.

I am using a form for debugging, my logic is complete and I would just like to call.

Protected Overrides Sub OnStart(ByVal args() As String) Dim Logic As New ProcessMail workTimer = New Timer(New TimerCallback(AddressOf Logic.ProcessMessages), Nothing, (1000 * 60 * 10), (1000 * 60 * 10)) MyBase.OnStart(args) End Sub 

Thus, it disables my code every 10 minutes. Why is this not working?

The service installs, I see it, but it starts and stops, can someone help me with what I am doing wrong?

+6
source share
1 answer

Check the event log. Often, the Windows service stops because an exception is thrown.

+7
source

Source: https://habr.com/ru/post/893370/


All Articles