我有一个引发以下异常的自定义共享点 Web 部件:
System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
at Waverly.SharePoint.Features.WebParts.SearchesListWebPart.Render(HtmlTextWriter writer)
The action that failed was:
Demand
The type of the first permission that failed was:
Microsoft.SharePoint.Security.SharePointPermission
The Zone of the assembly that failed was:
MyComputer
我的理论是 Sharepoint 没有运行 Web 部件的信任级别,但我很难弄清楚如何调试这个问题。有人有调试这样的经验吗?