Requested Registry Access Is Not Allowed

Issue

The problem was reported that no one is able to use InfoPath forms on the SharePoint sites; whereas, all the users were getting the generic SharePoint error with correlation ID. Checking the ULS logs showed the below

 

 xx/xx/xxxx xx:xx:xx.xx w3wp.exe 0x3394 SharePoint Foundation Runtime 6616 Critical Requested registry access is not allowed. 
xx/xx/xxxx xx:xx:xx.xx w3wp.exe 0x3394 SharePoint Foundation General aat87 Monitorable An unexpected error has occurred.

 

Checking ULS showed the below:

 Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          xx/xx/xxxx xx:xx:xx
Event ID:      6616
Task Category: Runtime
Level:         Error
Keywords:      
User:          NT AUTHORITY\IUSR
Computer:      ahmed.amin.com
Description:
Requested registry access is not allowed.

Cause

As reported in both the SharePoint ULS logs and the Application event log, "Requested registry access is not allowed".

Solution

In fact, we can resolve this issue by either following the hard approach, by using ProcMon, finding the registry key which we don't have access on, or just run the SharePoint Products Configuration Wizard which is used to secure the SharePoint resources (registry keys, and other resource). In our case, the problem was kind of severe, as there were some updates installed on one server and not on all the servers in the farm. Moreover, the customer did not run the SharePoint Products Configuration Wizard right after. Hence, when accessing the page Manage Servers in this farm (via Central Administration site >> System Settings) we found that some of the farm servers are with the status "Upgrade Required"!

 

In order to fix this issue, we firstly identified the missing updates on the farm servers, which were installed on one SharePoint server and not on all the farm servers, by accessing the page Check Product and Patch Installation Status (via Central Administration >> Upgrade and Migration), or you can simply list the missing updates by running the SharePoint Products Configuration wizard. Hereafter, we performed the below:

  1. Installed the missing SharePoint updates on all the farm servers.
  2. Restarted all the SharePoint servers after the updates were installed.
  3. Ran the SharePoint Products Configuration wizard starting with the Central Administration server, and sequentially on all the farm servers.

N.B., ensure that you perform the above steps using a farm administrator who is a local administrator on all the SharePoint servers in the farm.

 

If for any reason the above does not resolve your issue, run the below command via SharePoint Management Shell using your farm admin.

 psconfig.exe -cmd secureresources

 

P.S., please note that running the SharePoint Products Configuration Wizard will make all your SharePoint sites down. Hence, ensure planning this, and having a valid SQL backup from your SharePoint databases.