error while imparting webpart
Hello all, i am facing below error while imparting webpart.. i gt this error from ULSviewer.. Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Cannot import this Web Part. at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections) at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb) at Microsoft.SharePoint.WebPartPages.WebPartPreview.get_WebPart() at Microsoft.SharePoint.WebPartPages.WebPartPreview.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) thanx in advance, Sagar Joshi
December 24th, 2010 8:11am

As far as I can tell, this is the default message defined in the .webpart file. I think it is not finding the type correctly. <?xml version="1.0" encoding="utf-8"?> <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> <metaData> <type name="(TYPENAME GOES HERE)" /> <importErrorMessage>Cannot import this Web Part.</importErrorMessage> </metaData> <data> <properties> <property name="Title" type="string">My Custom Web Part</property> <property name="Description" type="string">Custom web part.</property> </properties> </data> </webPart> </webParts> The type is a normal .NET full assembly/class reference in the format: "Class, Namespace, Version, Culture, PublicKey" You can use reflector to double-check that out. Hope this helps! UPDATE: Maybe this should go in a developer section? Living the SharePoint dream...
Free Windows Admin Tool Kit Click here and download it now
December 25th, 2010 3:39am

Hi, According to your description, I suggest that you can check this thread: http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/10/06/troubleshooting-cannot-import-web-part-error.aspx http://stackoverflow.com/questions/120928/sharepoint-error-cannot-import-web-part I hope it can help you a little. Best regards, David Hu
December 27th, 2010 5:46am

Hi Radi.A, i checked all the points.. dll, xml file and its type, usercontrol , namespace, version all the points are correct... but m still getting same error.. any solutions? Thanks and Regards, Sagar Joshi
Free Windows Admin Tool Kit Click here and download it now
December 27th, 2010 11:35am

hi Radi.A, i gt the solution... actually there was problem in type name... thanks again, Sagar Joshi
December 28th, 2010 2:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics