only My site

Friday, January 27, 2012

Error : An error was encountered while retrieving the user profile.

Error : An error was encountered while retrieving the user profile.
Code which cause this error : UserProfile profile = mgr.GetUserProfile(user.Name);
Answer : UserProfile profile = mgr.GetUserProfile(SPContext.Current.Web.CurrentUser.RawSid);

No comments: