Tuesday, 1 November 2011

SharePoint Search: Illegal operation attempted on a registry key marked for deletion

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:

RegistrySetting

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

image

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.

5 comments:

  1. Hello,
    How did you know that this Group Policy setting change would resolve it?

    I am experiencing the same error message.
    Thanks

    ReplyDelete
  2. I noticed I was getting a few messages and warnings in the event log related to the User Profile Service in Windows. It was in diagnosing these that I discovered that it solved the search problem. Unfortunately, I haven't yet discovered why it is happening, but thought the info would be useful.

    ReplyDelete
  3. My suspicion: someone logged onto the system using the service account and then logged off. Meaning without the "do not forcefully unload ..." setting the profile gets unloaded and the still running service now got a problem accessing the registry

    ReplyDelete
  4. This Problem is described here: http://social.msdn.microsoft.com/Forums/ar-SA/commserver2007/thread/90e22b43-e24f-44be-9345-ecbade0b32c9

    and explained here:
    http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx

    ReplyDelete
  5. And also described here, as the first description is for Commerce Server 2007: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/b464d58a-32ff-44d0-93dd-b7b240e96869/

    ReplyDelete