web part迁移到sharepoint 2010后error的解决

简介:

问题描述:

一些站点上的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注册.


 相关资料:

http://social.msdn.microsoft.com/Forums/zh-HK/sharepoint2010setup/thread/96b497a7-8daf-460b-aa60-c209b565534f

 

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.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.portal.webcontrols(office.12).aspx

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

相关文章
|
1月前
An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
|
8月前
|
网络安全
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://xxxx.svc.cluster.local:8080/xxxx": Connection reset; nested exception is java.net.SocketException: Connection reset 什么原因导致得
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "xxxx.svc.cluster.local:8080/xxxx ": Connection reset; nested exception is java.net.SocketException: Connection reset 什么原因导致得
946 0
|
8月前
|
人工智能 Serverless
课时8:典型案例1:一键迁移 Web 应用
典型案例1:一键迁移 Web 应用
329 0
|
8月前
|
弹性计算 前端开发 Serverless
课时8:典型案例1:一键迁移 Web 应用
课时8:典型案例1:一键迁移 Web 应用
235 0
|
11月前
|
Java 应用服务中间件 Maven
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
82 0
|
12月前
An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
学习An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
143 0
An error happened during template parsing (template: “ServletContext resource [/WEB-INF/templates/in
|
缓存 Java Maven
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
104 0
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
|
XML 文件存储 数据格式
迁移windows 2008 IIS7 WEB服务器
迁移windows 2008 IIS7 WEB服务器
127 0
迁移windows 2008 IIS7 WEB服务器
|
前端开发 测试技术
单元测试Error creating bean with name org.springframework.web.servlet.resource.Resource
单元测试Error creating bean with name org.springframework.web.servlet.resource.Resource
250 0
单元测试Error creating bean with name org.springframework.web.servlet.resource.Resource