Using IPrinciple.Identity.Name as a key in a dataBase to identify user's rows.
        Posted  
        
            by bplus
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by bplus
        
        
        
        Published on 2010-05-03T12:32:07Z
        Indexed on 
            2010/05/03
            12:38 UTC
        
        
        Read the original article
        Hit count: 282
        
I'm writing a small intranet app that uses Windows Authentication and Asp.Net MVC. I need to store various bits of data in a db against each user. As far as I can tell the IPrinciple object does not seem to have something like a unique id. So I was thinking I could just use User.Identity.Name as a unique value to identify rows in my db. Is this a bad idea? Is there an alternative to this approach?
Thanks for any help.
© Stack Overflow or respective owner