Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I am looking for a simple way to track user activity of an asp.net membership enabled site. I would like to see who is accessing what pages and when, total visits for each page, etc.

Are there any open free solutions out there or a good example?
Posted
Updated 11-Oct-20 0:18am

 
Share this answer
 
Comments
Shashi226 23-Jan-13 4:23am    
I want to show to front end user how can with this
Prasad_Kulkarni 23-Jan-13 5:11am    
5'ed :-D
Abhinav S 23-Jan-13 5:37am    
Thanks.
Please refer following threads:

Tracking user activity in web applications:Tracking User Activity[^]
ASP.Net User activity tracking in database[^]

..and refer my answer to similar question:
how to store history of data changes[^]
 
Share this answer
 
Comments
Abhinav S 23-Jan-13 5:07am    
5! More links.
Prasad_Kulkarni 23-Jan-13 5:11am    
Thank you Abhinav :D
yes.
you can store all the user log details,i.e at what time there logging in and out.
however you will store the username and userid in session while SignIn.
create a table named user-log-details, where you can store
username,
session-Id,
browser name,
login-time and
logout-time.

save all the details while login-time and update the logout-time while SignOut.

for example,you can track the browser-name and IP-address by the following code..

string browser;


browser = (HttpContext.Current.Request.UserAgent.ToString().Contains("Chrome")) ? "Chrome" : HttpContext.Current.Request.Browser.Browser.ToString();


browser = ((browser == "Chrome") || (browser == "AppleMAC-Safari")) ? browser : browser + "-" + HttpContext.Current.Request.Browser.Version.ToString();
visitorIP = HttpContext.Current.Request.UserHostAddress.ToString();
 
Share this answer
 
Comments
neeraj_thakur 4-Apr-15 5:49am    
when we add id in session then with page reload it takes a error called session null in that case what we can do ? can you please reply on neerajthakur.3283@gmail.com

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900