SharePoint 2019 preventing the 0x800703FA error

adil 1,431 Reputation points
2025-11-24T10:17:01.5866667+00:00

I have Windows Server 2019 and SharePoint 2019 running on this and got below two exceptions frequently how to fix these exceptions and why these exceptions raised?

Unexpected Unable to write counter value to piiremoved with exception System.Runtime.InteropServices.COMException (0x800703FA): Retrieving the COM class factory for component with CLSID {piiremoved} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA) Unable to update the value of a system performance counter. The following exception was thrown: System.Runtime.InteropServices.COMException (0x800703FA): Retrieving the COM class factory for component with CLSID {piiremoved} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA).

Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Steven-N 15,720 Reputation points Microsoft External Staff Moderator
    2025-11-24T12:58:37.2833333+00:00

    Hi adil

    Thank you for reaching out to Microsoft Q&A forum

    As far as I know, the exceptions you are encountering in SharePoint 2019 on Windows Server 2019, specifically the COMException with HRESULT 0x800703FA, arise when SharePoint processes attempt to access a COM component for operations like writing to audit logs or updating performance counters. This failure occurs due to an "illegal operation attempted on a registry key that has been marked for deletion," typically triggered when the service account running the SharePoint application pool is used for interactive logons.

    Additionally, upon logoff, Windows unloads the user profile's registry hive, marking keys for deletion to reclaim resources, which prevents subsequent non-interactive SharePoint operations from accessing the required COM class factory, leading to these recurring errors in audit logging and performance monitoring.

    Link reference: "800703fa Illegal operation attempted on a registry key" error

    Therefore, you can try some workaround approaches to see if it can resolve your issue:

    1. Do not use the SharePoint service account for RDP or other interactive logins. Use separate admin accounts so the service account’s user profile isn’t loaded/unloaded, preventing registry key deletion.
    2. Recycle the affected IIS application pool or run iisreset to reload registry hives. If necessary, restart the server during a maintenance window.
    3. For permanent fix: You can try to enable the Group Policy “Do not forcefully unload the user registry at user logoff.” Then run gpupdate /force or reboot. In IIS, set the SharePoint application pool’s Load User Profile to True (monitor memory impact).
    4. Check ULS logs and Event Viewer for recurring issues. Install any relevant Windows/SharePoint updates.

    In case the issue still persists after trying all above method, kindly let me know in the comment section.

    Best regards


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".     

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.