RedirectFromLoginPage refuses to work!
Posted on 2004-08-31
Windows XP Prof.
FormsAuthentication.RedirectFromLoginPage(txtUserID.Text, True) fails to redirect to original URL.
I have text book code as described in the MS MCAD/MCSD self paced training book. I know it works 'cos I've had it working. But now it refuses to work! Can't believe the time I've spent trying to track this down. Now it's driving me crazy! Pls can anyone see a problem?
Redirection to the login page happens OK. The user is validated OK and the cookie gets written OK but the application just stays on the login page.
<forms name="freddy" loginUrl="AdminLogin.aspx">
restricted folder webconfig:
<deny users="*" />
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
'authenticate username/password from Users.xml
If IsUserValid(txtUserID.Text, txtPassword.Text) Then
litStatus.Text = "This userID and password is not authorised, try again."