0

I'm developing web application using ASP.NET MVC and I want to have mixed authentication - Forms and Windows. Each user will have a profile. How can I link domain account to user profile?

The first idea is to use full username including domain information as account identificator. (Property - User.Identity.Name)

Example: When "user_1" enters the application first time, he will get a profile linked to his full account name: "user_1@mydomain.com". If "user_1" changes his name to "user_2" he will be identificated as a new user and will lose access to his original profile!

How can I unambiguously identify domain account?

opewix
  • 4,993
  • 1
  • 20
  • 42
  • 1
    now if you want to give the user the possibility to change his username, then that should not be a key to identify him. there should be a unique username that never changes, and then you can give him the possibility to create a display name, different from his user name that is used as credential for login/logout – Bobby5193 Oct 15 '13 at 14:48
  • I've found that there is SID for each user. http://stackoverflow.com/questions/9477032/how-to-get-username-and-sid-for-user-by-a-domain-name-in-ldap – opewix Oct 16 '13 at 02:24

0 Answers0