登陆后保存用户信息的做法

来源:互联网 发布:python的高斯分布 编辑:程序博客网 时间:2024/04/29 00:54

1、一种做法是利用asp.net的web。conf配置来实现

<system.web>
     
<authentication mode="Forms">
        
<forms name=".ASPXAUTH" loginUrl="SysLogin.aspx" defaultUrl="Index.aspx" protection="All" timeout="30" path="/"  requireSSL="false" slidingExpiration="true" enableCrossAppRedirects="false" cookieless="UseDeviceProfile" domain="">
        
</forms>
    
</authentication>
   
<authorization>
    
<deny users="?"/>
   
</authorization>
</system.web>
    
<location path="ValidateNumber.aspx">
        
<system.web>
            
<authorization>
                
<allow users="?"/>
            
</authorization>
        
</system.web>
    
</location>
    
<location path="CheckSysLogin.aspx">
        
<system.web>
            
<authorization>
                
<allow users="?"/>
            
</authorization>
        
</system.web>
    
</location>

 

2一种是利用通过记录LastLoginTime来实现定时6或者是10分钟的自动过期策略

原创粉丝点击