博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
web part迁移到sharepoint 2010后error的解决
阅读量:6173 次
发布时间:2019-06-21

本文共 3406 字,大约阅读时间需要 11 分钟。

问题描述:

一些站点上的ListingSummary webpart在升级到moss(sharepoint) 2010后,无法正确显示,得到的报错信息如下:

英文报错:

 "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."
 

中文报错:

 Web 部件错误: 此网页上的某个 Web 部件或 Web 表单控件无法显示或导入。找不到该类型,或该类型未注册为安全类型。

 

解决方案:

从moss2007的页面导出webpart

 

得到类似“news.webpart”的文件.然后使用记事本打开,将原有内容:

 <type name="Microsoft.SharePoint.Portal.WebControls.ListingSummary, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
 

替换为:

 <type name="Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
 

 然后在moss2010的页面进行导入

 

 

还有一种未证实的方案:

到站点的webconfig,使用"SafeControl Assembly"将webpart注册.


 相关资料:

 

amonteiro
(Partner)
30
 

I have a lot of ListingSummary webparts that don't work after upgrading to SharePoint 2010. It throws the below error on the webpart page, however no errors in the upgrade process.

"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."

The ListingSummary webpart is a SharePoint webpart from SharePoint 2003 that was upgraded into the 2007 environment (I believe). In the 2007 environment when I export the webpart it has a reference to

Microsoft.SharePoint.Portal.WebControls.ListingSummary, Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

from what I understand the correct reference in SharePoint 2010 should be to

Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

Ofcourse I can manually export the webpart from 2007, edit it to the right reference, and import it to 2010 to get it to work (which I have tried and it works). However there are too many of these to do manually.

I have also tried writing a C# application to loop through all webparts in the sharepoint 2010 instance post upgrade; however the listingsummary webparts are returned as ErrorWebParts and therefore can't be exported or edited in code (from what I understand).

 

所有回覆

 
Hello,

The Listingsummary Webpart was made obsolete in 2007 and was replaced by the content query webpart.  SharePoint 2010 does not contain the Listingsummary class and therefore is giving the error.  Manual import to a content query webpart is the recommended and only solution.

From: http://technet.microsoft.com/en-us/library/cc179142(office.12).aspx

 SharePoint Portal Server 2003 listings do not exist in Microsoft Office SharePoint Server 2007.

 Migration path: During upgrade, areas are automatically moved to Webs and bucket Web URLs are removed. Favorites and other externally saved links must be changed. Upgrading automatically moves listings to an Office SharePoint Server 2007 list and a CBQ Web Part. It is recommended that users manually move the data to the summary links feature to receive all of the benefits of easy in-page link editing. To do this, users must add a summary links Web part or control to the page, and then manually copy links from the upgraded list to the summary links Web part. 

This following article shows the listingsummary class as obsolete in 2007.

本文转自    yuxye   51CTO博客,原文链接:http://blog.51cto.com/fishvsfrog/687856

转载地址:http://xfxba.baihongyu.com/

你可能感兴趣的文章
富士通仍执着SPARC架构芯片 将坚持推新
查看>>
易宪容:企业要利用大数据挖掘潜在需求
查看>>
微软声称Win10周年更新为Edge浏览器带来更好电池寿命
查看>>
混合云是企业IT的未来吗?
查看>>
LINE在日本取得成功 但全球化之路还很长
查看>>
红帽云套件新增QuickStart Cloud Installer,加快私有云部署
查看>>
MapXtreme 2005 学习心得 一些问题(八)
查看>>
流量精细化运营时代,营销SaaS之使命——流量掘金
查看>>
雅虎同意出售核心资产
查看>>
Win10大丰收的节奏 微软收编iOS全部150万应用
查看>>
智慧城市要除“城市病” 中兴通讯开辟新增长极
查看>>
Opera已确认解散iOS开发团队
查看>>
DevOps:新的业务浪潮
查看>>
CERT:启用EMET的Windows 7比Windows 10更加安全
查看>>
LINE上市:一场迟到、勇敢又无奈的IPO
查看>>
OA选型:OA系统工作流是核心
查看>>
如何发现“利用DNS放大攻击”的服务器
查看>>
《Arduino开发实战指南:LabVIEW卷》——第2章 Arduino软件
查看>>
京津冀大数据走廊起笔谋篇
查看>>
WIFI连网一“吻”通 黑科技让无线路由器更智能
查看>>