Forms Authentication and Login controls
        Posted  
        
            by DotnetDude
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by DotnetDude
        
        
        
        Published on 2010-05-12T17:09:15Z
        Indexed on 
            2010/05/12
            17:14 UTC
        
        
        Read the original article
        Hit count: 562
        
I am upgrading a website written using ASP.NET 1.1 and the logic for the login page includes verifying the credentials, calling FormsAuthentication.SetAuthCookie() and populating the Session with the user information.
I am updating this page to use Login controls and the Membership API and am trying to wrap my head around the concepts that have been changed.
- Most of the samples I see do not do anything on the login button event handler, so is the logic of setting the cookie abstracted out into the control?
 - Also, how do I check if a user is logged in or not on other pages. Does it still store user information using the Session?
 - How do I check if a user belongs to a particular role or not (Earlier, I would look in the Session object to do something like this)
 - Is the Session a bad way of storing user info?
 
Thanks
© Stack Overflow or respective owner