Search Wiki:
Resource Page Description
When moving a database with backup/restore between different web farms the URL from the Publishing Pages to the PageLayout often contains the server name of the original farm.
That can lead to exceptions. Details can be found here:

This tool allows to correct this problem.

To build this tool you need to
- create a new C# console application project in VS.NET with name "FixPageLayout"
- replace the .cs file with the FixPageLayout.cs file included in this download
- add references to Microsoft.SharePoint.dll and Microsoft.SharePoint.Publishing.dll
- build the project

Syntax to use the tool:

FixPageLayout.exe <url-to-sitecollection>

Last edited Jul 29 2008 at 10:49 AM  by StefanGossner, version 2
Hanif wrote  Jan 19 2009 at 1:15 PM  
Hi Stefan,

I was getting "File Not Found" error when i was trying to restore site collection backup from one server farm to another.I downloaded your console application and followed the steps mentioned above.When i ran the console app, i could see that the old server url's were getting replaced by the current server url's.However even after running this application, i'm still getting this "File Not Found" Error.Have i missed something here?
Any help is higly appreciated.Thanks in advance.


pawanu wrote  May 13 2009 at 4:52 PM  

I am using SharePoint (Version: 12.0.6318.5000). The scenario is like that;
• I have created a Site Collection and under that I have 2 sub sites and under each sub sites again I have a sub site (Site Collection [level 1]>>>SubSite+Lists [level 2]>>>SubSite+ Lists [level 3]>>>Lists, Doc. Library and Picture Library).
• I have modified a master page and given different name and used as custom and default master page throughout site collection. My master page is having some custom CSS and Image links (used $SPurl so that it should appear in all the sub sites).
• I have created Some Custom Pages using SharePoint Designer and saved at the same level of home page(default.aspx) of site collection and sub sites also
• Now I have used Solution generator to generate WSP (with the help of WSP Builder from Codeplex site) and created custom 3 different site definitions for each level. Our need was that, If we need to create any level we can easily create new sub site and all the custom pages, library will be available automatically

This WSP has been verified and accepted by our client and they have deployed in test environment. Due to some reason they used it as the live site and now they have lots of data in it.

Now my problem is if we take backup and restore it to the some other location using stsadm admin tool, all the navigations are showing 404 file not found error except setting pages (_layouts/pagesnames.aspx).

Is any possible way of resolving this issue or any other alternatives of restoring data to other server with Custom Site Definition.

Thanks in Advanced

Page view tracker