Windows Service
-
Hello All!! I have created a windows service and the problem is when I log off my system account in which the service is currently running, the service stops. Why is this so? I want my service to run independent of my system account. Thanx in advance regards Mubashir Storan Technologies (USA)
-
Hello All!! I have created a windows service and the problem is when I log off my system account in which the service is currently running, the service stops. Why is this so? I want my service to run independent of my system account. Thanx in advance regards Mubashir Storan Technologies (USA)
It stops because you have logged off and it was running under those credentials. Logging off destroyes the process under which all sub processes run so therefore your service dies. If you want it to run regardless of the logged on user, you'll need to change the service properties so that it runs under the localservice userid etc..
...Steve
1. quod erat demonstrandum 2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once :-) -
Hello All!! I have created a windows service and the problem is when I log off my system account in which the service is currently running, the service stops. Why is this so? I want my service to run independent of my system account. Thanx in advance regards Mubashir Storan Technologies (USA)
This doesn't make any sense. A true service application runs regardless of who is logged in and it keeps running even if the user at the console logs off. Your description makes me think that you actually wrote a Windows application and are running it under the logged in user at the console, possibly out of the StartUp folder. Dave Kreskowiak Microsoft MVP - Visual Basic