Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

c#, read user session from event log

Posted on 2014-04-11
10
Medium Priority
?
624 Views
Last Modified: 2014-06-03
Hi,

First, I am not sure if it is possible to get session information from event log of Windows. I am in need to read user session logs like when new user log in or log out.

Is it possible?

Thanks
0
Comment
Question by:josephm67
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39994671
What "session information" are you looking for?
0
 

Author Comment

by:josephm67
ID: 39994714
I m looking for login and log out info of users
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39994962
Do you want to create a new record on Windows Event Log when a user log in or log out?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:josephm67
ID: 39994976
Yes, I need to grab it and then put it in database. Is it possible?
0
 
LVL 15

Assisted Solution

by:jorge_toriz
jorge_toriz earned 1332 total points
ID: 39994997
Yes, you can do that, but first I need to know if you are working on a desktop application or a web application?

Meanwhile I can give you the following code:

During log in process
System.Diagnostics.EventLog.WriteEntry("YourApp", "User USERNAME logged in");
DBStoreLogIn("USERNAME");

During log out process
System.Diagnostics.EventLog.WriteEntry("YourApp", "User USERNAME logged out");
DBStoreLogOut("USERNAME");
0
 

Author Comment

by:josephm67
ID: 39995209
It is desktop app. But, I want to grab the event. Is it possible to grab the event.

thanks
0
 
LVL 15

Assisted Solution

by:jorge_toriz
jorge_toriz earned 1332 total points
ID: 39995280
Event... what do you mean with "event"?, is there an event like "user_logged_in"? I can't depict the event you need to handle.

As far as I know you could write that pseudo-code in your authentication function, so you will be able to store the event on wherever you want.
0
 

Assisted Solution

by:josephm67
josephm67 earned 0 total points
ID: 39995341
What is authentication function?
You are talking about something else, I guess. I need to grad windows event when user log in to server or log out. Are you talking same?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 668 total points
ID: 39995392
Are you talking about Windows user login? This info is captured in the Security node of event viewer.
0
 

Author Closing Comment

by:josephm67
ID: 40108044
thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question