Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi!.

 

Does anyone know how one would go about monitoring or fetching info in some system log about login attempts that has failed. The application would be running, where upon the user would "lock" Windows. And I need to be able to keep track of login attempts. For instance if someone were to try and log on to my computer i'd later be able to see the time and such for the event.

 

Is this possible somehow?

 

EDIT: On Windows XP systems.

  • Administrators
Posted

If auditing is enabled on the PC in question (can be setup through Administrative Tools -> Local Security Settings -> Local Policies -> Audit Policy) then this information will be logged into the standard Security Event Log.

 

This information can then be accessed through code via the EventLog class

System.Diagnostics.EventLog evt = new System.Diagnostics.EventLog();
evt.Log="Security";
foreach(System.Diagnostics.EventLogEntry entry in evt.Entries)
{
//do stuff with entry here
}

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Thank you! :)

 

This application thing I need is ment for a friend, yes truly; a friend. Whom I just now got to install .net 2 runtime.

 

The problem I forsee at the moment though might be that it is not enabled in her XP. And she is using XP Home and appearently MS have hidden alot of things.

 

Not even running: "%SystemRoot%\system32\secpol.msc /s" directly works.

 

Any programatic way of enabling it?

 

Thanks in advance!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...