you need to use GenericPrincipal or create a CustomPrincipal, seeHow To Implement Role-Based Security with Forms-Based Authentication in Your ASP.NET Application by Using Visual C# .NET http://support.microsoft.com/default.aspx?scid=kb;EN-US;311495Custom Authentication provider by implementing IHttpModule, IPrincipal and IIdentity http://www.codeproject.com/aspnet/AspNetCustomAuth.asp
使用users没问题,但是我想用role来定义一群users,再通过配置role的权限来控制role里的users的访问权利。想windows下的用户和组的概念。http://dev.csdn.net/develop/article/17/17884.shtm
没能写到user和role的关系对于windows的认证方式,roles的值就是widnows用户的组,但是对于forms,如何把user和role结合起来就没有提到了
http://support.microsoft.com/default.aspx?scid=kb;EN-US;311495Custom Authentication provider by implementing IHttpModule, IPrincipal and IIdentity
http://www.codeproject.com/aspnet/AspNetCustomAuth.asp