sharepoint-2007 - Sharepoint-Active Directory 配置文件

标签 sharepoint-2007

我编写了以下代码来编辑 MOSS 2007 的用户配置文件。通过 Active Directory 填充用户配置文件。

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++;
                    }

}

详细信息正在正确更新。

我的问题是我需要使用哪个站点来更新详细信息。

例如,我有 SSP 服务 WebApplication、中央管理 Web 应用程序和其他 Web 应用程序。

我需要使用哪个站点来更新配置文件,以便在所有站点中更新配置文件名称。

任何人都可以指出我正确的方向。

谢谢你。
哈里·吉拉拉
NHS 直接。

最佳答案

在 sharepoint 2007 中,SPSite 属于 SPWebApplications,它们与存储用户配置文件属性的 SSP 相关联。

SPSite sc = new SPSite("http://xxxxx:81");
ServerContext context = ServerContext.GetContext(sc);

这些行有效性查找与您传入的 SPSite url 关联的 SSP。

看起来您只有一个 SSP,因此您在构造函数中使用的任何 SPSite url 都会为您提供对正确 SSP 的引用。

一旦信息存储在 SSP 数据库中,计时器作业就会将 SSP 存储中的信息复制到各个 SPSite 数据库中,并将其复制到隐藏列表“用户信息列表”中。

这个链接解释了 2010 年,让我看看我是否能找到 2007 年的:

http://www.harbar.net/articles/sp2010ups.aspx

编辑

我为您找到了 2007 年的解释链接:

http://blah.winsmarts.com/2007-7-MOSS_User_Profile_Info_-_How_the_information_flows.aspx

关于sharepoint-2007 - Sharepoint-Active Directory 配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4690205/

相关文章:

sharepoint - 如何在 Sharepoint 母版页中包含动态信息?

sharepoint - 用于创建 Web 应用程序的 STSADM 命令

javascript - 在 SharePoint/MOSS 2007 中使用 jQuery 和 jQuery UI

c# - 如何将特定 SharePoint 组添加到列表权限

powershell - 通过 View 将Powershell和Sharepoint导出列表项导出到CSV

sharepoint - 是否可以在 Office 2003 中隐藏 Web 文件属性对话框?

sharepoint-2007 - Sharepoint 2007 的休息网络服务

c# - SharePoint 以编程方式将内容写入站点导航

c# - 哪种访问共享点的方法更好?

c# - 我应该在更改 ParserEnabled 的值后调用 SPWeb.Update