密码应每90天过期一次. [英] The password should expire after every 90 days.

查看:110
本文介绍了密码应每90天过期一次.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要密码的密码,密码应该在90天后过期

i want the code for the password, the password should expire after 90 days

推荐答案

我们无法回答-我们一无所知关于您的登录系统.

但是,如果您使用的是会员制,则:

1)在global.asax中为HttpApplication.PostAuthenticateRequest事件添加事件处理程序. 2)在会员数据库中找到该用户并获取LastPasswordChangedDate
3)使用TimeSpan,将其与当前日期进行比较,并确定密码上次更改是否超过了必要的天数
4)如果已过期,请重定向到ChangePassword屏幕
We can''t answer that - we don''t know anything about your login system.

However, if you are using the Membership system, then:

1) Add an event handler for the HttpApplication.PostAuthenticateRequest event in global.asax
2) Find the user in the membership database and get LastPasswordChangedDate
3) Using a TimeSpan, compare this with the current date and decide if the password was last changed more than the requisite number of days ago
4) If expired, redirect to the ChangePassword screen



如果您使用的是Cookie,则您的代码中应包含此行

Hi ,
IF u are using Cookies you should have this line in ur code

Cookies.Expires = DateTime.Now.AddDays(90);



最好的问候
M.Mitwalli



Best Regards
M.Mitwalli


您可以在数据库中获取一个表,当您登录到应用程序后,将一条记录插入该表中.然后在您的代码中检查是否为90天,然后重定向到版本已过期的页面
you can take a table in the db, when ur loggin to the application insert a record into the table. And in your code check if it is 90 days then redirect to the version expired page


这篇关于密码应每90天过期一次.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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