I have formsauthentication in place with user and password informatin hardcoded in the web config file. I have a Login control on a Login.aspx page and the following code on the default page:
if (!User.Identity.IsAuthenticated)
FormsAuthentication.RedirectToLoginPage();
This is my Login.aspx.cs code:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (FormsAuthentication.Authenticate(Login1.UserName, Login1.Password))
{
FormsAuthentication.SetAuthCookie(Login1.UserName, Login1.RememberMeSet);
switch (Login1.UserName)
& ...
Go to the complete details ...