August 24, 2007

MOSS: All web parts appear as ErrorWebPart

When trying to enumerate web parts on a site all web parts appear as ErrorWebPart. There are OOB and custom web parts on the site.

In my case I have a Web Service that is used to create new MOSS sites. At some stage I need to define the Audience setting of some web parts and it has to be done programmatically. As far as I know, Audience settings cannot be set in Site Definitions. Please let me know if it is possible.

Put all custom web parts in GAC. It appears that if even one custom web part has problems with permissions (not in GAC or otherwise not trusted), all web parts appear as ErrorWebPart.


  1. Awesome. Thanks for the post, this helped me out big time.

  2. What in case of Out of the Box Webparts like ContentEditor Webpart?

    1. That must be something totally different. Perhaps verify that all necessary features are activated on the site. If this is upgrade scenario, then again it might be databases not being upgraded or pretty much anything :(