Tuesday, 1 November 2011

I came across this issue today when attempting to run a search query from a SharePoint 2010 farm. The UI displayed a rather ugly error message with corresponding correlation ID, which displayed as follows in the ULS logs:

Exception when fetching results: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA) (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Runtime.InteropServices.COMException: Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.Office.Server.Search.Query.KeywordQueryInternal.Execute() at Microsoft.Office.Server.Search.Query.QueryInternal.Execute(QueryProperties properties) at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Execute(QueryProperties properties) at SyncInvokeExecute(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.Se...).

It was solved by configuring the following Group Policy setting on the SharePoint server:

You can also configure this setting directly in the registry by creating a DisableForceUnload REG_DWORD value and setting it to 1, as follows:

I’m assuming from the message it related to the Query component, but unfortunately can’t be sure as my Web front-end, query, crawl and search service application roles were all located on the same server. It would be great if anyone has any information on this.