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

相关文章
|
6月前
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
|
网络安全
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 什么原因导致得
2028 0
|
3月前
|
JavaScript 安全
SharePoint Online 部署SPFx Web部件
【8月更文挑战第10天】在SharePoint Online中部署SPFx Web部件需先安装Node.js及Yeoman等工具,通过Yo生成器创建项目。开发Web部件后,使用`gulp`命令构建、打包并生成.sppkg文件。接着,在SharePoint管理中心的应用程序目录上传并部署该解决方案包至目标网站。最后,通过编辑页面插入Web部件进行测试,确保遵循最佳实践并维护更新。
|
3月前
|
前端开发 JavaScript
【Azure 环境】前端Web通过Azure AD获取Token时发生跨域问题(CORS Error)
【Azure 环境】前端Web通过Azure AD获取Token时发生跨域问题(CORS Error)
|
4月前
|
API 网络架构 C++
SharePoint Online SPFx Web部件绑定数据
【7月更文挑战第6天】在Markdown格式下,以下是关于创建SharePoint Online SPFx Web部件绑定数据步骤的摘要: 1. 创建数据列表。 2. 使用VS Code打开Web部件。 3. 定义列表模型(如`IList`和`IListItem`接口)。 4. 引入`spHttpClient`以执行REST API请求。 5. 实现`_getListData()`方法,调用REST服务获取列表数据。 6. 设计`_renderList()`方法来渲染数据。 7. 在`render()`方法中获取并渲染数据到Web部件。
|
5月前
|
运维 Serverless API
Serverless 应用引擎产品使用合集之如何实现一键迁移Web框架
阿里云Serverless 应用引擎(SAE)提供了完整的微服务应用生命周期管理能力,包括应用部署、服务治理、开发运维、资源管理等功能,并通过扩展功能支持多环境管理、API Gateway、事件驱动等高级应用场景,帮助企业快速构建、部署、运维和扩展微服务架构,实现Serverless化的应用部署与运维模式。以下是对SAE产品使用合集的概述,包括应用管理、服务治理、开发运维、资源管理等方面。
|
5月前
|
安全 前端开发 Java
Java Web项目登录报Session Error
Java Web项目登录报Session Error
39 0
|
6月前
|
关系型数据库 数据库 PostgreSQL
postgresql|数据库迁移|ora2pg工具的web界面介绍
postgresql|数据库迁移|ora2pg工具的web界面介绍
150 0
|
人工智能 Serverless
课时8:典型案例1:一键迁移 Web 应用
典型案例1:一键迁移 Web 应用
|
弹性计算 前端开发 Serverless
课时8:典型案例1:一键迁移 Web 应用
课时8:典型案例1:一键迁移 Web 应用
下一篇
无影云桌面