S
Steven Nagy
Hi All,
So I have this fundamental problem that is going to influence design
decisions.
We want to use the ActiveDirectoryMembershipProvider but use a custom
profile provider.
When you inherit from ProfileProvider you have to implement the
abstract methods and so on.
Those methods force you to deal with user accounts based on user name.
This seems fundamentally flawed to me. In Active Directory, a user
account can be renamed.
If I have a user who has used my application and they therefore have a
profile under that username (eg "bob") then if they get their username
renamed to "robert", the next time they use my application they will
not have a profile.
The work around to this is that when I receive a username in my
profile provider methods, I then lookup the guid for that user against
AD, except that this violates the whole point of a provider model. In
other words, if I later change from using
ActiveDirectoryMembershipProvider to SqlMembershipProvider, then the
profile provider will suddenly stop working.
I thought all this was suspect. So I used Reflector to look at how MS
implemented their SqlProfileProvider. Turns out they base everything
on username which means an AD rename like I mentioned above would
cause the "lost profile" problem mentioned earlier (I have not
actually proved this with working code however).
Can you see my problem here?
If anyone can shed light on the problem, please reply.
Many thanks in advance,
Steven Nagy
So I have this fundamental problem that is going to influence design
decisions.
We want to use the ActiveDirectoryMembershipProvider but use a custom
profile provider.
When you inherit from ProfileProvider you have to implement the
abstract methods and so on.
Those methods force you to deal with user accounts based on user name.
This seems fundamentally flawed to me. In Active Directory, a user
account can be renamed.
If I have a user who has used my application and they therefore have a
profile under that username (eg "bob") then if they get their username
renamed to "robert", the next time they use my application they will
not have a profile.
The work around to this is that when I receive a username in my
profile provider methods, I then lookup the guid for that user against
AD, except that this violates the whole point of a provider model. In
other words, if I later change from using
ActiveDirectoryMembershipProvider to SqlMembershipProvider, then the
profile provider will suddenly stop working.
I thought all this was suspect. So I used Reflector to look at how MS
implemented their SqlProfileProvider. Turns out they base everything
on username which means an AD rename like I mentioned above would
cause the "lost profile" problem mentioned earlier (I have not
actually proved this with working code however).
Can you see my problem here?
If anyone can shed light on the problem, please reply.
Many thanks in advance,
Steven Nagy