Wednesday, December 21, 2011

SharePoint 2010 - LDAP membership provider for FBA prefixes “i:0#.f|”


SharePoint 2010 - LDAP membership provider for FBA prefixes “i:0#.f|” .
if you are adding SharePoint user profile with code follow this format
"i:0#.f|lmymembershipprovider|myuserid"
mymembershipprovider : is the name of membership provider you defined in your web.config file
myuserid: "user id"
it is necessary to prefix the userid with membership provider if you defined multiple membership providers in your config file.
If you don't prefix "i:0#.f|" ('f' stands for Form Based Authentication) for an FBA user, Sharepoint won't identify the user when trying access userprofile store and may throw a security exception.
If you are yelling " WHY...???".......it's "SHAREPOINT" :)

Note : for windows authentication, the format is i:0#.w ('w' stands for windows)
Note : If this helped you, please add a comment and share the link as it will motivate me to post more solutions like this.

No comments:

Post a Comment