根据特定时间在asp.net中禁用用户 [英] Disable user based on some specific time in asp.net

查看:69
本文介绍了根据特定时间在asp.net中禁用用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在开发一个asp.net应用程序,在该应用程序中每年向成员授予成员资格,我的问题是如何使用户在一年结束后禁用?用户不会每天或经常登录,所以我不想检查登录事件的任何条件.请给我任何好的解决方案.

谢谢

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

推荐答案

1.您必须必须在数据库中存储颁发成员资格的日期和到期日期.
2.现在检查此范围的当前日期.
3.如果当前日期超出此范围,则只需通过显示消息来阻止用户登录.

希望您能通过这种逻辑了解到一个想法
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


您可以创建Windows服务,该服务每天都会自动检查一次,一旦用户在定义的到期时间到达,它就会禁用用户的帐户,并且您可以发送电子邮件通知关于用户订阅即将到期的信息.
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.


除了上述好的建议之外,

您可以根据到期日期定义活动用户的状态.和@登录检查此状态.如果出现故障,则重定向到另一条消息(页面).
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).


这篇关于根据特定时间在asp.net中禁用用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆