症状
使用 SPWorkflowDataSource 或 FabricWorkflowInstanceProvider 用户控件的自定义 SharePoint 页面上的某些功能无法工作,可以在 SharePoint 统一日志记录系统 (ULS) 日志中的事件标记中看到 9zu4p 或 9zu4q事件标记。 安装以下 2021 年 2 月 9 日的 SharePoint 安全更新后出现这个问题:
原因
转换 SPWorkflowDataSource 和 FabricWorkflowInstanceProvider 中的类型后,安全规则会得到增强。 只能转换受信任的类型。
解决方法
要还原无法运行的功能,如果阻止的类型是安全的,则在 Web.config 文件中将阻止的类型添加为受信任的类型。
为此,在 Web.config 文件(在 configuration/SharePoint/SafeMode/AllowConvertTypes 元素下)添加具有 type 属性的 AllowConvertType 元素,如下所示:
<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="15" TotalFileDependencies="250" AllowPageLevelTrace="false">
<AllowConvertTypes>
<AllowConvertType type="<allowedConvertTypeName>, <allowedConvertTypeAssemblyName>, <AssemblyVersion>, <AssemblyLanguageSetting>, <AssemblyPublicKey>"/>
</AllowConvertTypes>
</SafeMode>