Wednesday, December 1, 2010

How to reslove SharePoint error: “Cannot import Web Part”

As we all knows that MY MSN and MSN Spaces are Portal web sites. These sites organized their data into discrete units that support a degree of personalization.Portal sites organized their information into standalone parts , these parts are called WebParts. Users can rearrange those parts to suite their individual working styles.

While importing (drag/drop) your webpart to any SharePoint page, if you receive an error “Cannot import webpart” or “Unable to add selected web part(s)”! Just like this error msg:

[WebPartPageUserException: Cannot import MyWebPart Web Part.]”

Than you are not able to open your sharepoint site. Here is some points that you should have to follow to resolve this issue:

First check web part gallery & verify that your web part is in the list. If it's not, you need to go install it. If it is there,

than click on the link to the web part- i.e. “MyWebPart.webpart”, not the icon if still you get same error than there is something wrong with the way the web part is installed on your server. Check The next thing you do is click the Edit icon (the one next to the webpart link). From this page, you can make use of the View XML link to look at the .webpart file that is installed. Also confirm that the assembly path is correct given your DLL.

If you have verified that your .webpart is correct, make sure that the DLL for you web part actually exists. DLL exists in GAC.

After checking all steps if you still get same error msg than you can try SharePoint Server Recovery Software. SharePoint Recovery software are user friendly & have no need of technical knowledge. Everyone can use this software just need to download its demo version. You can try Stellar Phoenix SharePoint Server Recovery Software to resolve this issue. This software has a feature by which you can check the preview of recoverable sharepoint database So just download its demo version & check how much data is recovered by this software.

1 comment:

  1. One of the scenarios in which you would get an error on clicking the webpart link is if the webpart class name is different in the .webpart file. Happened to me when I changed the class name in the .cs file (as part of refactoring and code review) but did not make the change in the .webpart file!