关于Microsoft.SharePoint.Security的问题

新建了一个webpart并将其部署成功。其中有个方法是要调用 SPContext。现在将这个用户控件添加到webpart中时,系统提示

“发生了意外的错误”

查看日志显示: 

请求“Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”类型的权限已失败。"

 

 

解决方法:

sharepoint 站点下web.config trust level设置为"Full"  "WSS_Medium"; 

即可解决 

 

posted @ 2009-11-29 20:54  time is money  阅读(345)  评论(0编辑  收藏  举报