Requested Registry Access Is Not Allowed Error During Installation of Web Service

Description

During the installation of web service you may see the following error as soon as you finish configuration and try to check it using CheckStatus method:

Log contains this error:

Log:
2017-07-14 06:56:27,183 [25] ERROR w3wp [(null)] - Request processed with error response 'rcGeneralError'
System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at eWay.Core.WmiWrapper.ServiceManager.GetServiceNameByFilePath(String serviceFilePath)
at eWayWSImpala.eWayWS.CheckStatus()
The Zone of the assembly that failed was:
MyComputer

Version

All versions of eWay-CRM

Difficulty

High

Resolution

Error cause: NETWORK SERVICE user under which the web service runs, has no permissions to access Microsoft Windows services. CheckStatus method checks whether eWay Timer service runs.

You need to change NETWORK SERVICE user to LOCAL SYSTEM in application pool configuration.