Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > Windows Service OnStart event
 

Windows Service OnStart event

Hi all,

I've got a VB windows service that scans for files in specific folders.

The New event sets the file listener properties of App.Logg

The OnStart event opensa few registry keys, starts a timer and write various messages in the log file. The strange thing is that these log file entries are not visible once the service starts.

Is there an interval on when messages are written or does it have to do with the Flush method?

Thanks,

Ivan

Cryo75  Friday, May 04, 2007 11:36 AM
What is the name of the log file? How are you writing to it? The service may not have the appropriate permissions to write to the file in question.

Check the event logs on the computer to see if there is any additional information.

Chris
Chris Dunaway  Friday, May 04, 2007 9:15 PM

The log gets written but only when I call the Flush() method explicitly. I've also set the AutoFlush property to True but it doesn't seem to be working.

Furthermore, is there a way to configure the columns (and their order) of the entries being written in the file?

Thanks,

Ivan

Cryo75  Saturday, May 05, 2007 6:10 AM

You can use google to search for other answers

Custom Search

More Threads

• How to default DataGridViewCheckBoxColumn value to checked?
• Need help with Management System Project, Searching a TXT file and getting data when clicking in a listbox.
• drawing alpha-blended images on a form
• Vb.net [2008] LINQ xml query - anonymous type problems
• TreeView and mouse node events
• Does File System Watcher control work on Vista?
• Change one field in a table
• Use the Windows 7 "Windows Security" Dialog Box in VB App
• C# Compatibility and case-sensitivity
• How to return how many days since Jan 1st for any given year using VB.Net 2005