Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Preview Web Part in Web Part Gallery does not work

  Asked By: Adriane    Date: Apr 16    Category: Sharepoint    Views: 4194

I have created a custom web part and deployed it on WSS 3.0. I am able
to add the web part to any web part page and it renders fine. I also
have some events in the web part. Now when I try to preview the web
part in the web part gallery, here is what I get

An error occured when previewing the Web Part. 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.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Mia Scott     Answered On: Apr 16

Did you configure Visual Studio to debug your webpart
on the server? This will show you which line of code
in your webpart  is throwing the error.

article on debugging webparts:
blogs.msdn.com/.../how-to-debug-a-web-part-for-sh\
arepoint-2007.aspx

 
Answer #2    Answered By: Kristian Chaney     Answered On: Apr 16

I did configure Visual Studio to debug the
web part. However, since the error  occurs not when loading the web
part page  where the web  part is hosted, but when the web part  is being
previewed in web part gallery  (Site Collection Admin has access to
this gallery), I cannot really debug the webpart. It has something to
do with WebPartPreview mode which I am not able to figure out. Please
provide me some insight if you have come across this problem on any
custom web part.

 
Didn't find what you were looking for? Find more on Preview Web Part in Web Part Gallery does not work Or get search suggestion and latest updates.




Tagged: