Friday, December 08, 2006

Requested registry access is not allowed

At the project I am working on I mainly use the Event Log to write progress statements from my orchestrations. On my develop-machine I ran into the error message 'Requested registry access is not allowed'.

It appeared that the user account under which the processing host runs, did not have enough authorisations to access the Event Log.

This can be fixed by giving that user account full control to a certain Registry Key.
To achieve this you must start the Registry Editor (regedit.exe) and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog. Right click on the node and click 'Permissions...'.
Next add the user account under which the processing host runs and give this user full control.
Close the dialog and the Registry Editor and finally restart the processing host.

You should now be able to write to the Event Log.

1 comment:

Lex Hegt said...

Update:

After some more investigation it seemed, that the real problem was that the user was not authorized to create a new EventlogSource.
Although the provided solution authorises the user to create the new EventlogSource, it's better to create that EventlogSource when you are installing your application (with a .msi) on the server.