I noticed that you add the following modification "pages[@pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"]". I think it's better to add an empty "<Pages />" node as EnsureSection. Because of this "pageParserFilterType" check, i now ended up with two <pages> nodes.
↧