Custom Web Part Problem After SharePoint Restore
Hi, I've recently moved our sharepoint site and databases (using Microsoft Internal Database) to another standalone server. I did a catastrophic backup and then restored it on the destination server successfully via the central Administration page. I have also copied our custom web part library dll to 'c:\windows\assembly' directory and 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin' directory. I also copied over the old web.config file to 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80'. However, I still seem to be missing something as I get the error below while loading the site. I haven't been able to find a solution so hoping someone has seen it before here. Has anyone seen this happen before? Any advice/help would be greatly appreciated. Many thanks. Mehds ERROR====================================================================================================== The “webpartname” web part appears to be causing a problem. Object reference not set to an instance of an object. Web parts maintenance page: if you have permission, you can use this page to temporarily close web parts or remove personal settings. For more information, contact you site administrator. ==========================================================================================================
January 11th, 2010 1:43pm

As said that you have moved the site along with the dll's and safecontrols of the web.config file, the problem may be wit some value which may be missing in the webpart added in the page.Does the webpart referring to any other values in the site.Another reason can be some corrupt URL, which the webpart is referring to...So the solution is :Try removing(delete) the webpart which is corrupted from the webpart maintanece page and later re--add it step- by-step.Another chance is that the version number or the public key token of the dll which the webpart refers from has changed and you haven't updated them in the safe control tag in the web.config file.Cheers!......... Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
Free Windows Admin Tool Kit Click here and download it now
January 11th, 2010 2:12pm

hi, Make sure your running the same service pack level on both source and destination sharepoint if possible. Make sure you install all webparts, solutions, features, etc on new server before you restore the content database, so that it can find all the features it's looking for. Make sure you copy any files that may be living in the file system that you need, sometimes people have css/javascript here. (This refers to files in the hive)Best Regards, Ammar MCT
January 11th, 2010 2:13pm

Thanks Ajith for the suggestions. 1) I checked the version number and public key token just now but they appear to be ok. I checked all the entries between the 'SafeControl' tag. There is one entry in the SafeControl tag which from the original web.config file. It is: <SafeControl Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf385as364e35" Namespace="System.Web.UI" TypeName="*" Safe="True"/> I'm not sure what this entry is for. One thing to note is that I didn't just move accross entries from the original web.config file to the new web.config file. I actually replaced the new web.config file on the destination server with the old config file (I backed up the file first). Maybe that would cause the issue? 2) I wanted to remove the web part from the web maintenance page but that page does not load. I get an IE error stating 'Internet Explorer cannot display the webpage'. This is unfortunate as it could have been quite helpful.
Free Windows Admin Tool Kit Click here and download it now
January 11th, 2010 2:53pm

Thanks for your suggestions too Ammar. Much appreciated. The service levels are the same I believe. When you say 'install all webparts' you mean by placing the web part dll in the correct folders? I have looked at the solutions and features also. We dont have any features but we do seem to have some solutions deployed in the old environment which I have not yet put on the new server. However, none of those solutions refer to the specific webpart error being given currently - so I dont think the solutions are the issue....yet. Any more ideas?
January 11th, 2010 3:08pm

Try opening the webpart maintanence page by adding ?contents=1 to the page URL and remove the webpart.Try changing the web.config with the orginal one and add the <safe control> from the web.config to the new one.Also try with an IISRESET after the above steps.Cheers!........Regards, Aj (http://www.ajittgeorge.blogspot.com) MCTS
Free Windows Admin Tool Kit Click here and download it now
January 11th, 2010 5:52pm

Thanks again for the thoughts Ajith. I managed to find the problem...it was simple. I needed to connect the destination server to the domain as the webpart obtained data from network resources. Thanks again.
January 11th, 2010 7:16pm

Hi msib7, can you please explain how you managed it! I got same error while removing my custom visual webpart. I can open from maintenance page but any work around for normal way to delete!
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2010 4:26pm

Hi Abhiknz, My problem was that the sharepoint server I had setup was isolated at the time while I tested, not connected to any network. The custom webpart I was using accessed another server on the network to obtain data. All I did was connect the SharePoint server to the network and add it to the domain. Hope this helps :)
September 2nd, 2010 7:43pm

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

Other recent topics Other recent topics