Generating an image from a workflow, i'm getting this error..
"The type initializer for 'System.Workflow.ComponentModel.Design.WorkflowTheme' threw an exception. ---> System.UnauthorizedAccessException: Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft Corporation\Internet Information Services\7.5.7600.16385' is denied."
It seems that WorkflowTheme constructor is trying to access that registry key (it doesn't exist), but doesn't have permission.
This error only occurs when I deploy the application on some Windows Server 2008 machines. Can anyone help?
p.s. I already tried adding the permissions to Everyone (Full Control) on the 'HKEY_CURRENT_USER\Software’ keys.
Try giving permission on the registry key Computer\HKEY_USERS.Default to your AppPool - i.e. IISAPPPOOL\DefaultAppPool or IISAPPPOOL\*YourAppPoolName* if you are using a custom AppPool.
The class System.Workflow.ComponentModel.Design.WorkflowTheme has a static constructor that retrieves the location of the theme files from the registry but it doesn't handle the exception if the caller doesn't have the appropriate privileges to read from that location.
Further details can be found here: http://world.episerver.com/Blogs/Johan-Bjornfot/Dates1/2010/1/Workflow-image-generation-failure/