We are using asp.net Membership provider, we have around 40 applications where the users, roles everything configured through Membership provider. Now one of the requirement that we have is to disable access to some applications if user haven't logged a application since 30 days. We should not touch the application just membership provider manipulation is what we can do.
1 Answers
0
votes
If you have the database access, you can actually try to disable the login using a database script so the change can be applied without you touching the application at all.
For example, you can first query the membership table, like aspnet_Membership, and find the records where the last login date is great than and equal to 30 days (datediff(day, lastlogindate, getdate()) >= 30), then set the field IsLockedOut = 1 on those records.
Hopefully this helps.