views:

507

answers:

3

Hi

I have moss .wsp that is installed on a single sharepoint server and works correctly when in preview mode.

I have now moved the SharePoint site to another server and added/deployed the same .wsp but on this new server I get the following error when trying to preview the web part in the gallery:

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)

Can anyone suggest how to find what might be causing the problem bearing in mind that this is a production environment?

All the best

+1  A: 

Did you test your package on a test environment, or just copy the build WSP from your dev server to production?

All sorts of things could have gone wrong, so it would be very hard to guess from the above what is happening.

An educated guess would be that your package did not contain all relevant artifacts that was there on your dev environment (third party dll, user control, take your pick!)

Hence it is considered a good practice to have a test environment (more often than not our customers have 5 environments, all scripted so we can be sure they are as identical as possible) so that you can test that your packages actually work before deploying to production!

Also i can recommend snapshots of dev environments, so that you can scratch your dev servers every week. They can all too quickly become different from the testing and production environment, and this is where things start to get ugly and packages break on test server.

hth Anders Rask

Anders Rask
A: 

Check the logs in the 12 hive, sometimes they contain helpful information.

Jason
+1  A: 

If you simply moved the content database over, you might want to redeploy your WSP.

WSP deploy files locally inside the SharePoint hive (C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12) and are most likely required to run.

If you didn't join a new server to the farm and then disconnected the old server, the files are most likely missing.

Maxim