ASP.Net Forms Authentication 
Author Message
 ASP.Net Forms Authentication

I believe I have everything setup and coded correctly to perform forms
authentication, but it doesn't seem to be working. It knows when to
show my Login page and it handles proper and improper
userids/passwords correctly, but when a valid user is entered it
appears as if it will redirect to the originally requested page, but
it returnes to the login page (with the user id values wiped clean).

My code looks like all the samples I have seen:
        If FormsAuthentication.Authenticate(sUser, sPassword) Then
            FormsAuthentication.RedirectFromLoginPage(sUser, True)
        Else
            lblMessage.Text = "<b>The user id '" & sUser & "' or
password entered are invalid, please re-enter.</b>"
        End If

I'm not sure what the problem is, can someone help?

Thanks,
Craig



Fri, 08 Jul 2005 11:02:11 GMT  
 ASP.Net Forms Authentication
When Forms Authentication succeeds ASP.NET issues a cookie so that the user
can be identified next time they make a request on the site, and they no
longer have to login.  One thing to check is that your browser is accepting
the cookie.  It sounds as though yours might not be.

--

Mark Bower
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:
> I believe I have everything setup and coded correctly to perform forms
> authentication, but it doesn't seem to be working. It knows when to
> show my Login page and it handles proper and improper
> userids/passwords correctly, but when a valid user is entered it
> appears as if it will redirect to the originally requested page, but
> it returnes to the login page (with the user id values wiped clean).

> My code looks like all the samples I have seen:
>         If FormsAuthentication.Authenticate(sUser, sPassword) Then
>             FormsAuthentication.RedirectFromLoginPage(sUser, True)
>         Else
>             lblMessage.Text = "<b>The user id '" & sUser & "' or
> password entered are invalid, please re-enter.</b>"
>         End If

> I'm not sure what the problem is, can someone help?

> Thanks,
> Craig



Tue, 12 Jul 2005 04:10:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB.NET with ASP.NET web forms

2. Passing Form Fields to VB.NET Custom Business Object in an ASP.NET Code Behind Page

3. Survey on ASP/VS6.0 versus ASP.NET/VS.NET

4. Visual Basic.NET , ASP or ASP.NET

5. VB6/ASP vs .NET/ASP.NET development

6. ADO.NET with ASP.NET using VB.NET

7. IDE Editor in ASP.Net Web forms

8. Asp.net Invisible Form Post

9. passing values between web forms in ASP.NET

10. Using Windows Form Control in asp.net

11. basic questions about posting forms in asp.net

12. Using Windows Forms from ASP.NET

 

 
Powered by phpBB® Forum Software