Be careful when editing the application.master page

Here's an odd one.

We had customized our master pages by adding in the Search WebPart, so we could customize some of the parameters

We changed the following:

<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server"></asp:ContentPlaceHolder>

To the following:

<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SPSWC:SearchBoxEx webpart="true" runat="server" __webpartid="{2883947B-2B5C-4A56-92B3-33B7383F7C0D}" id="SearchBoxEx1"><WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
  <Title />
  <FrameType>None</FrameType>
  <Description>Used to search document and items.</Description>
  <IsIncluded>true</IsIncluded>
  <ZoneID>ImportedPartZone</ZoneID>
  <PartOrder>0</PartOrder>
  <FrameState>Normal</FrameState>
  <Height />
  <Width />
  <AllowRemove>true</AllowRemove>
  <AllowZoneChange>true</AllowZoneChange>
  <AllowMinimize>true</AllowMinimize>
  <AllowConnect>true</AllowConnect>
  <AllowEdit>true</AllowEdit>
  <AllowHide>true</AllowHide>
  <IsVisible>true</IsVisible>
  <DetailLink />
  <HelpLink />
  <HelpMode>Modeless</HelpMode>
  <Dir>Default</Dir>
  <PartImageSmall />
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <PartImageLarge />
  <IsIncludedFilter />
  <ExportControlledProperties>true</ExportControlledProperties>
  <ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
  <ID>g_455588d4_92a9_484e_9273_9221d7a9a97f</ID>
  <GoImageUrl xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/gosearch.gif</GoImageUrl>
  <GoImageUrlRTL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/goRTL.gif</GoImageUrlRTL>
  <GoImageActiveUrl xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/gosearch.gif</GoImageActiveUrl>
  <GoImageActiveUrlRTL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/goRTL.gif</GoImageActiveUrlRTL>
  <DropDownModeEx xmlns="urn:schemas-microsoft-com:SearchBoxEx">ShowDD_DefaultContextual</DropDownModeEx>
  <AdvancedSearchPageURL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/SearchCenter/Pages/advanced.aspx</AdvancedSearchPageURL>
  <SearchResultPageURL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/SearchCenter/Pages/results.aspx</SearchResultPageURL>
  <ScopeDisplayGroupName xmlns="urn:schemas-microsoft-com:SearchBoxEx">Search Dropdown</ScopeDisplayGroupName>
  <RegisterStyles xmlns="urn:schemas-microsoft-com:SearchBoxEx">true</RegisterStyles>
  <ShouldTakeFocusIfEmpty xmlns="urn:schemas-microsoft-com:SearchBoxEx">false</ShouldTakeFocusIfEmpty>
                </WebPart>
</SPSWC:SearchBoxEx>
</asp:ContentPlaceHolder>

We did this in all our master pages including the application.master page.

All was working fine until we tried to delete a column in a list and we go the "Unknown Error" message and the column wasn't deleted.

The following error message was be ing logged

Application error when access /_layouts/mngfield.aspx, Error=Unable to validate data.   at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)     at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) 

After of a month or so of investigation with Microsoft support, we discovered that the Search Webpart was causing the problem in the application.master page and causing a conflict in one of the application pages in the "Layouts" directory, specifically the mngfield.aspx page.

We have removed the Search WebPart from the application.master page and all seems to be working fine.

You may also like: