I've been stuck with this annoying problem for the last couple of hours, and I've just exhausted my resources. This is what's going on:
I have a Windows Service created using the 4.0 .NET framework. The main functionality of this service is to read all .txt files contained in a folder, validate the formatting of these files and then send them to another folder, create an xml file from those files, and then create a pdf file using the information contained in the xml; I'm using the Report.NET library (http://sourceforge.net/projects/report/) to create these .pdf files.
When I run the service, it does everything it's supposed to do except generate the .pdf file, and then I get the following error:
"Service on Local Computer started and then stopped. Some service stop automatically if they have no work to do."
Also, I forgot to mention, if I debug the windows service using Visual Studio, everything works as intended and the .pdf files are generated correctly.
I've already tried attaching the "main" function to a thread and then starting that thread on the OnStart() method, but that doesn't seem to work, neither adding a timer.