设为首页 收藏本站
查看: 1208|回复: 0

[经验分享] web part迁移到sharepoint 2010后error的解决

[复制链接]

尚未签到

发表于 2019-2-4 13:12:46 | 显示全部楼层 |阅读模式
  问题描述:
  一些站点上的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”的文件.然后使用记事本打开,将原有内容:
  



  替换为:
  



  然后在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










运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-671748-1-1.html 上篇帖子: SharePoint 2010 RBS FILESTREAM Provider 的“垃圾收集” 下篇帖子: 用SharePoint 2007的Excel Services 制作实时更新的销售任务“计时牌”
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表