Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I am developing an asp.net application in which members are given membership on yearly basis, my question is how do i make the users disable when their one year is finished? users will not log in everyday or frequently so i don't want to check any condition on log in events. Plz suggest me any good solution.

Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 12-Mar-12 2:46am    
How do you define "disable"? Account is disabled or something else. Do you authenticate the user, anyway?
--SA
Member 8145305 12-Mar-12 3:30am    
by disable i mean i will suspend the user by changing the role of user programatically and that role will display just a suspended page.

1. You must have to store the date of issuing the membership and date of expiry in your database.
2. Now check the current date for this range.
3. If the current date is beyond this range then just prevent the login of the user by displaying the message.

Hope u get an idea through this logic
 
Share this answer
 
Comments
Member 8145305 12-Mar-12 3:37am    
when and in which event do i check this condition? in the question above its written i don't want to check any condition in log in event.
Aniket Yadav 12-Mar-12 4:57am    
check that on date changed event if you have shown date in your form/Page.
You can create Windows service, which would check automatically everyday and disable user's account once user reach at defined expiration time and you can send email notification about the expiration of the user's subscription.
 
Share this answer
 
apart from above good suggestions

you can define the status of active user according to expiredate. and @ login check this status. if fales then redirect to another message(Page).
 
Share this answer
 

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