473,394 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Notification of Logon and Logoff

I'm trying to write a service that will sit on the domain controller (or, if
this proves to be impossible, to be rolled to all connecting Windows
machines).

It needs to get notification of each logon and logoff, capturing username &
IP address. I've currently got a test application to check the inputs &
outputs and the business logic is using EventLog_OnEntryWritten to trap 538's
& 540's. Unfortunately (and peculiarly) a physical logon logs multiple logon
and logoff events, and a logoff does the same (albeit only a few extras).
Since each one triggers an event in the logic, part of which records the
state, the user can be (after logon) in either a state of logged on or logged
off.

Does anybody have a definitive method for capturing logon & logoff events?
Jun 27 '08 #1
1 2705
Perhaps this will help shed some light.
http://www.tunexp.com/news/windows-story-670.html

However, I didn't know you can get the IP Address of the attempted login
device, rather just the workstation id from the event itself.
"djcaseley" <dj*******@discussions.microsoft.comwrote in message
news:6A**********************************@microsof t.com...
I'm trying to write a service that will sit on the domain controller (or,
if
this proves to be impossible, to be rolled to all connecting Windows
machines).

It needs to get notification of each logon and logoff, capturing username
&
IP address. I've currently got a test application to check the inputs &
outputs and the business logic is using EventLog_OnEntryWritten to trap
538's
& 540's. Unfortunately (and peculiarly) a physical logon logs multiple
logon
and logoff events, and a logoff does the same (albeit only a few extras).
Since each one triggers an event in the logic, part of which records the
state, the user can be (after logon) in either a state of logged on or
logged
off.

Does anybody have a definitive method for capturing logon & logoff events?

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Aarti | last post by:
I have written a windows service that needs to perform certain functions only if a User is logged in. The problem I am running into is that I get an error if the computer is in the process of being...
1
by: Jonas | last post by:
Hi! I'm building an ASP.NET web application that needs an automatic logoff after a specified time out period, forcing the user to enter his/her Windows authentication credentials again. I use...
2
by: Raimund Taschler | last post by:
Hi all, I'm implementing a windows service (running with local system account) which has to do some tasks when users logon/logoff. How can the service register to those logon/logoff-events? I'm...
6
by: Oscar Santiesteban Jr. | last post by:
I need help...here is the problem. Last weekend, the servers in our datacenter where moved around. After this move, and maybe coincidental, 1 server is performing very poor. After running a...
0
by: gewe | last post by:
Can anyone tell me what is wrong with the following code? The code has to watch for logon/logoff events: public void StartListenLogon() { EventHandler handler = new EventHandler();...
0
by: robpimentel | last post by:
Hi, I've been using DB2 for about 1 week, so please bear with me. DB2 Connect Enterprise Edition v8.1 FixPack 5 Windows Server 2003 Standard Edition SP1 Here is an error that continues to...
2
by: Robert Scheer | last post by:
Hi. I need to write a service that writes to a database the time of the logon and logoff of the users. Our users logs on Active Directory and some can also log as local administrators. The...
0
by: questionit | last post by:
Hi 1) I have installed Ms Exchange Enterprise Edition. Since then Windows LogOff and Shutdown has become too slow. Installed the same Exchange server on another Machine, that too has become too...
2
by: Dan2kx | last post by:
Function LogonLog(OnOff As String) Dim rst As DAO.Recordset If OnOff = "On" Then Set rst = CurrentDb.OpenRecordset("tblLogonLog", dbOpenDynaset, dbAppendOnly) rst.AddNew ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.