【发布时间】:2011-07-31 19:24:38
【问题描述】:
由于this,我需要将 ContentEditorWebPart 添加到 SafeControls 列表中。除非有更好的方法...
问题是,我不想手动添加,我想在部署解决方案时自动添加。
所以我尝试将我的安全控件添加到需要此功能的模块的 .spdata 中,如下所示:
<SafeControls>
<SafeControl Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="ContentEditorWebPart" Safe="True" />
</SafeControls>
但是当我检查我的 web.config 时,它会将程序集更改为我的项目程序集..
如果我将它添加到我的包中,我必须使用它部署 Sarepoint dll。
那么将它添加到 SafeControls 的最佳方法是什么?
【问题讨论】:
标签: sharepoint-2010 web-parts safecontrols