look into 
Forms-Based Authentication
http://samples.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspxRole-based Security with Forms Authentication
http://www.codeproject.com/aspnet/formsroleauth.asp

解决方案 »

  1.   

    按照你所给的例子http://samples.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspx是不是
    FormsAuthentication.RedirectFromLoginPage(UserEmail.Value,PersistCookie.Checked);
    就可以通过验证阿,但式一式string i=User.Identity.IsAuthenticated.ToString();
    Response.Write(i);返回值还是false,可以说清楚些么
      

  2.   

    if you follow the example1. create three files, web.config, login.aspx, default.aspx, make sure they are in the root of a virtual directory2. add this line to Page_Load in default.aspx:
    Response.Write("***" + User.Identity.IsAuthenticated + "***");3. visit default.aspx, it will redirect you to login.aspx, enter "[email protected]" as the login name, "password" as the password, click on the login button, you will be redirected back to default.aspx, and see***True***