I apologize if this is in the wrong forum. Please move where appropriate if it is. I developed a Windows Service in C# with .NET 2.0. It uses the SMO api to backup an mssql database. The service just sits and every 24 hours it kicks off the backup. To test this, I left my computer on (running Vista BTW), but locked the screen.
When I came in this morning I checked the service and it had stopped. I looked at the Event Viewer and I had the following:
An unhandled exception ('System.ArgumentOutOfRangeException') occurred in BackupService.exe [2888]. Just-In-Time debugging this exception failed with the following error: Either a required impersonation level was not provided, or the provided impersonation level is invalid.
Check the documentation index for 'Just-in-time debugging, errors' for more information.
Looking this up online I see a lot of ASP.NET references with regards to specifying impersination levels in the web.config. But since this isn't a web app, I'm not sure what I need to do. The service is running pretty wide open right now as I am the administrator on the machine and the ProcessInstaller account is LocalSystem.
Thanks for any help.
Gregg