Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving profile data thru UserProfileManager class

Status
Not open for further replies.

duftstenen

IS-IT--Management
Dec 4, 2008
14
0
0
DK
Hi everyone,

I have a problem getting user profile data saved. It works fine, if Im changing profile fields of string type e.g. WorkEmail or FirstName, but when it comes to type of person, e.g. Manager, it gives me an error when I put the ntaccount-value(before any commit) into the Manager.Value attribute. The value comes from a peoplepicker, where the name are resolved.

It tells me:
"Could not find SID corresponding to input account name"

However, If i try to retrieve the user (which are imported from the AD) I can see that it has a SID mapped into that specfic account name.

UserProfileManager profileManager = new UserProfileManager(context);
UserProfile u = profileManager.GetUserProfile(System.Web.HttpContext.Current.User.Identity.Name);

u[PropertyConstants.Manager].Value = "domain123\\bobby"

Anyone got a solution for this? If I try to search for it on Google, there are nothing to be found.

D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top