Web部件错误
本文关键字:错误 Web | 更新日期: 2023-09-27 18:01:30
一个SharePoint的开箱即用(用SharePoint工具创建的,没有自定义代码)web部件突然停止工作,只提供以下信息用于调试:
Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.
我失去了为什么所有其他部分(自定义代码和内容)似乎加载,但只是这一个正在寻找类型/dll抛出异常。
从哪里开始调试,我现在必须学习SharePoint的哪些部分?
我检查了应用程序托管的日志,没有发现直接指向该问题的问题。
没有什么问题,除了:没有找到听众。
添加自定义web部件到sharepoint站点时在Web.config
文件中,在SafeControls
元素下添加以下元素:
<SafeControl Assembly="AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="NamespaceName" TypeName="*" Safe="True" />
更多信息请参考此链接http://support.microsoft.com/kb/939306