简体   繁体   中英

Log each user login/logout ASP.Net Membership

In a simple asp.net application I'm using the standard ASP.Net authentication with roles and access restriction to some website folders and files.

There something set up to record all user actions (at least login and logout, maybe also page requests)?

I need to log date and time of each login and logout to make some stats for each user. If there is nothing just prepared I thought I'd do it with a simple database table with username, date and time, login / logout.

I strongly suggest you read about log4net http://www.nuget.org/packages/log4net/ . It allows you to log data to a number of output targets. You can also enable logging during runtime without having to modify your running application's binary =]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM