ASP.NET: Using Session to store authentication?

Posted by Niels Bosma on Stack Overflow See other posts from Stack Overflow or by Niels Bosma
Published on 2010-06-03T11:38:46Z Indexed on 2010/06/03 11:54 UTC
Read the original article Hit count: 206

I'm having a lot of problems with FormsAuthentication (http://stackoverflow.com/questions/2964342/problem-with-asp-net-authentication) and as as potential work around I'm thinking about storing the login in the Session?

Login: Session["Auth.ClientId"] = clientId;

IsAuthenticated: Session["Auth.ClientId"] != null;

Logout; Session["Auth.ClientId"] == null;

I'm not really using most of the bells and whistles of FormsAuthentication anyway. Is this a bad idea?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about forms-authentication