Windows service detect user logon




















NET 3. What is the best way to handle this login event? Thursday, March 22, PM. That is a rather important detail. I would host the wcf service in the wpf app. Write my own activity detecting process which resets last use time. We went that route in a recent silverlight app.

I had a global holding last activity time which was reset on mouse move and keypress. I used a astoryboard as a timer to see if i should time out.

There was already a central keyboard handler in our app though. This approach below is unreliable, but would work if it timed out before windows. You'll need a service that starts up when any user logs on. In there, override onsessionchange using System; using System.

Generic; using System. Linq; using System. Text; using System. ServiceProcess; using System. SessionLogon: Debug. Visual C. Sign in to vote. Saturday, April 29, AM. You can place a Service Manager that starts your service in the Startup directory, so it will be started when a user logon. On XP and higher you can turn on the "Logon auditing" in the "Local policies". Monday, May 1, AM. I tried to find where those settings are in regedit but i couldn't find them anywhere Tuesday, May 2, PM.

Proposed as answer by bodhi citta Thursday, June 10, AM. There is another quicker option that you can directly type "gpedit. How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Detect user log on from a Windows Service Ask Question.

Asked 10 years, 11 months ago. Active 10 years, 11 months ago. Viewed 2k times. John Saunders k 25 25 gold badges silver badges bronze badges. Goro Goro 9, 21 21 gold badges 69 69 silver badges bronze badges. Will it work for you to simply have a "popup" application run in the login script? Add a comment. Active Oldest Votes.



0コメント

  • 1000 / 1000