I've created a run of the mill C# Windows Service using the windows service project template. I've been able to install it correctly, and start and stop it without any issues.
However, when I go to my event viewer to see the log of it starting and stopping, I get nothing.
Here's the sample code I'm testing:
public MyService()
{
InitializeComponent();
ServiceName = "My Data Service";
EventLog.Log = "Application";
}
protected override void OnStart(string[] args)
{
EventLog.WriteEntry("Starting My Data Service");
}
protected override void OnStop()
{
EventLog.WriteEntry("Ending MyData Service");
}
Also, my OS is Windows Vista.