问题求教,sharepoint方面的

bixiaoxia 2010-06-28 01:15:48
sharepoint的表单认证数据存在哪里,怎么保持身份?用自带的webservice怎么实现表单认证?
...全文
67 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
cshadow 2010-06-28
  • 打赏
  • 举报
回复
表单认证Web Service的地址是:http://[server]/[site]/_vti_bin/authentication.asmx


在使用Web Service的程序中再次加入上面这个Web引用,假设其命名空间是spwsAuth,

spwsAuth.Authentication auth = new spwsAuth.Authentication();
auth.CookieContainer = new CookieContainer();
auth.AllowAutoRedirect = true;
spwsAuth.LoginResult lr = auth.Login("username", "password");
if (lr.ErrorCode == spwsAuth.LoginErrorCode.NoError)
{
 spwsList.Lists wsList = new spwsList.Lists();
  wsList.CookieContainer = auth.CookieContainer;
 XmlNode res = wsList.GetListCollection();
  Console.WriteLine(res.OuterXml);
  }
cshadow 2010-06-28
  • 打赏
  • 举报
回复
表单认证是SharePoint 2007新加入的一种身份认证方式,后台是使用.Net Framework中的Membership机制进行用户身份的识别

在使用表单认证的SharePoint网站中通过Web Service获取数据稍微麻烦一些,不过也可以通过SharePoint提供的表单认证Web Service来创建用户身份相关的Cookie

3,242

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 SharePoint
社区管理员
  • SharePoint社区
  • 霖雨
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧