Я пытаюсь обновить профили пользователей в моем приложении SSP, и у меня есть 10000 записей. Большинство из них обновляются впервые, и есть 21 запись, которые обновляются каждый раз, когда я запускаю код.Sharepoint-Active Directory Profiles-Preferred Name не обновляется
Я не знаю, почему это происходит ..
Может ли тело помочь мне, что происходит с моим кодом.
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPSite sc = new SPSite("http://xxxxx:81");
ServerContext context = ServerContext.GetContext(sc);
HttpContext currentContext = HttpContext.Current;
HttpContext.Current = null;
UserProfileManager profileManager = new UserProfileManager(context);
foreach (UserProfile profile in profileManager)
{
if (profile[PropertyConstants.PreferredName].ToString().Contains("Domain\\"))
{
profile[PropertyConstants.PreferredName].ToString().Replace("Domain\\", "").ToString();
profile.Commit();
NoOfUser++;
}
}
Спасибо
Хари Gillala
NHS Direct