I have a windows service that I'm installing on a server. The service uses CDO to iterate through mail items in a public folder. The CDO code works fine in a windows forms application that I've been using to debug it. The service works fine as far as starting, stopping and writing to the event log.
However, when I put the CDO related code into the service, it's as if it is completely ignored. No error messages, no unexpected service stops or anything. It just doesn't perform.
For instance: I had the code I needed executed on the elapsed event for a timer. On elapsed, the service would write a test entry to the event log, then try to access the public folder, then write the number of messages in the folder to the event log. Neither eventlog entry was added. However, when I moved the CDO code into a separate procedure and called it from the OnElapsed event (leaving the first event log entry in the event itself) the first entry would be added to the event log, and then nothing. The service would continue to run, the timer continues to loop adding the initial event log every ten seconds, but the CDO code never goes anywhere.