是否有办法通过Services基础设施检索FBA的“用户角色”数据?
它在检索SharePoint组、权限和角色时发挥了很好的作用,但是如何使FBA用户成为FBA角色的成员呢?
对于基于声明的id,“GetRoleCollectionFromUser”方法表示“用户未找到”,如‘i:0#.fbamembershipprovider fbaadmin3 3’。还有其他方法吗?
发布于 2012-10-19 20:34:50
我不认为你能通过SP网络服务获得它。您必须直接使用角色提供程序接口来查询角色。在SharePoint 2010中使用成员资格和角色提供程序也有几个捕获,因为并非所有的函数都已在其“代理”成员资格提供程序中实现。我建议查看FBA包中的代码,以获得一些如何实现它的示例。Utils.cs和UserEdit.aspx.cs应该为您提供一些很好的示例:
http://sharepoint2010fba.codeplex.com/SourceControl/changeset/view/458f208d6152#Visigo.Sharepoint.FormsBasedAuthentication%2fVisigo.Sharepoint.FormsBasedAuthentication%2fCode%2fUtils.cs
http://sharepoint2010fba.codeplex.com/SourceControl/changeset/view/458f208d6152#Visigo.Sharepoint.FormsBasedAuthentication%2fVisigo.Sharepoint.FormsBasedAuthentication%2fLayouts%2fFBA%2fMANAGEMENT%2fUserEdit.aspx.cs
https://stackoverflow.com/questions/12972660
复制相似问题