将 FBA 用户添加到 Sharepoint 用户信息列表
我们使用 C# 中的 Membership 类成功地将新用户添加到基于表单的身份验证提供程序。我们可以登录一些公共网站,但在尝试在人员选择器中搜索新创建的用户后,他没有出现。
看来我们必须在 WSS_Content_* 数据库中添加一条 UserInfo 记录。因此,我们引用了在 Sharepoint 上运行的 people.asmx Web 服务。尝试使用以下方法创建 UserInfo 后,该方法返回未解析的 PrimaryInfo 对象(UserInfoID 为 -1、IsResolved 为 false 等)。
peopleservice.People service = new peopleservice.People();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
string[] users = new string[] { txtCreateEmail.Text };
var result2 = service.ResolvePrincipals(users, brnextranet.SPPrincipalType.User, true);
我们还缺少什么步骤吗?
We are successfully adding a new user to our Forms Based Authentication Provider using the Membership class in C#. We are able to login some public sites but after trying to search for the new created user in the people picker he doesn't show up.
Seems like we have to add a UserInfo record in the WSS_Content_* Database. So we referenced the people.asmx Web Service running on our Sharepoint. After trying to create the UserInfo using the following method, the method returns a not resolved PrincipalInfo object (UserInfoID is -1, IsResolved is false, etc.).
peopleservice.People service = new peopleservice.People();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
string[] users = new string[] { txtCreateEmail.Text };
var result2 = service.ResolvePrincipals(users, brnextranet.SPPrincipalType.User, true);
Are there any steps we are missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过创建在 Sharepoint 服务器上运行的 Web 服务来解决该问题。创建UserInfo记录需要以下两种方法:
I was able to solve the issue by creating a Web Service running on the Sharepoint Server. The following two methods are required to create a UserInfo record: