Windows Service question

V

vul

I created Windows Service in VB.Net with the name MSFaxListener.
It should listen Windows Fax Service events and update SQL Server database
when fax job changes it's status. In order to do that in OnStart event of
MSFaxListener I'm trying to connect to MS Fax Service.
I set Startup Type of MSFaxListener to Automatic, so it starts and listens.
Sometimes it doesn't connect to MS Fax Service. I think it is because MS Fax
Service did not start before.
I'm new to Windows services. So I do not know what to do to start
MSFaxListener only after MS Fax Service started. I see Dependencies tab in
MSFaxListener properties, but there is nothing.
How do I make MSFaxListener be dependant on MS Fax Service?
Is it a bad idea to try to connect to MS Fax Service in OnStart event of
MSFaxListener? Maybe I need to move it somewhere else? In Timer for
instance?

Thank you
Al
 
R

Ronchese

You need to implement some retry code inside your service.

Use a timer to recheck the MS Fax Service each 60 seconds, and stops it at
end of 10 minutos, for example. And, for each retry, write it to eventlog.

--
[]s
Cesar




"vul" <[email protected]> escreveu na mensagem
I created Windows Service in VB.Net with the name MSFaxListener.
It should listen Windows Fax Service events and update SQL Server database
when fax job changes it's status. In order to do that in OnStart event of
MSFaxListener I'm trying to connect to MS Fax Service.
I set Startup Type of MSFaxListener to Automatic, so it starts and listens.
Sometimes it doesn't connect to MS Fax Service. I think it is because MS Fax
Service did not start before.
I'm new to Windows services. So I do not know what to do to start
MSFaxListener only after MS Fax Service started. I see Dependencies tab in
MSFaxListener properties, but there is nothing.
How do I make MSFaxListener be dependant on MS Fax Service?
Is it a bad idea to try to connect to MS Fax Service in OnStart event of
MSFaxListener? Maybe I need to move it somewhere else? In Timer for
instance?

Thank you
Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top