you can do it without a database very easily. Here is an example of using the login control.
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (FormsAuthentication.Authenticate(Login1.UserName, Login1.Password))
{
e.Authenticated = true;
}
else
{
e.Authenticated = false;
//FormsAuthentication.SetAuthCookie(Login1.UserName, true);
}
}
web.config
<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="pkellner" password="pass1"/>
<user name="someguy" password="password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
Peter Kellner
http://peterkellner.netMicrosoft MVP • ASPInsider