sharepoint的问题

canyangruxie 2011-02-11 01:10:34
sharepoint,通过client对象模型改变Web.AllProperties属性值后,通过server对象模型SPWeb.Properties访问不到。这是为什么?

using (ClientContext clientContext = new ClientContext(SharePointSiteUrl))
{
clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
clientContext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo(SharePointSiteUser, SharePointSiteUserPassword);
Web oWebsite = clientContext.Web;
clientContext.Load(oWebsite.AllProperties);

try
{
clientContext.ExecuteQuery();

oWebsite.AllProperties[key] = value;

oWebsite.Update();

clientContext.ExecuteQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
...全文
41 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

17,741

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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