ASP.NET&Spring.NET&NHibernate最佳实践(二十五)——第4章权限子系统(18)

修改Web.Config,新增
< membership  defaultProvider ="HibernateMembershipProvider" >
      
< providers >
        
< clear />
        
< add  name ="HibernateMembershipProvider"  type ="Guushuuse.SalaryPrj.Security.Providers.HibernateMembershipProvider, Guushuuse.SalaryPrj.Security"  enablePasswordRetrieval ="false"  enablePasswordReset ="false"  requiresUniqueEmail ="false"  requiresQuestionAndAnswer ="false"  minRequiredPasswordLength ="1"  minRequiredNonalphanumericCharacters ="0"  applicationName ="SalaryApp"  passwordFormat ="Hashed" />
      
</ providers >
    
</ membership >

    
< roleManager  enabled ="true"  defaultProvider ="HibernateRoleProvider"  cacheRolesInCookie ="true"  cookieName =".ASPXROLES"  cookieTimeout ="60"  cookiePath ="/"  cookieRequireSSL ="false"  cookieSlidingExpiration ="true"  cookieProtection ="All" >
      
< providers >
        
< add  name ="HibernateRoleProvider"  type ="Guushuuse.SalaryPrj.Security.Providers.HibernateRoleProvider, Guushuuse.SalaryPrj.Security"  applicationName ="SalaryApp" />
      
</ providers >
    
</ roleManager >

你可能感兴趣的:(Hibernate)