Opening InfoPath form in SharePoint ‘Requested registry access is not allowed’

Opening InfoPath form in SharePoint ‘Requested registry access is not allowed’

This is another gotcha that I’ve run into today – when I went to publish an InfoPath form to my SharePoint site I spotted an error in the design checker ‘Invalid Form Template’. I ignored the error and carried on but when I tried to create a new form based on the template in the document library, I received the following error –

Requested registry access is not allowed. at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource) at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) at Microsoft.Win32.RegistryKey.OpenSubKey(String name) at Microsoft.Win32.Registry.GetValue(String keyName, String valueName, Object defaultValue) at Microsoft.Office.InfoPath.Server.Runtime.FormServer.<>c__DisplayClass1.b__0

I did some research and came accross this blog post from Joel Oleson (@joeloleson) which helped me fix the problem –

http://blogs.msdn.com/joelo/archive/2008/01/02/evaluation-version-expired-but-not-really.aspx

The steps I took to fix the error were slightly different from Joel’s (see below) but his blog post helped to point out the registry keys on which the access was failing.

The application pool account for my SharePoint web application was running as ‘Network Service’, I did try and add this account to the ‘Distributed Com Users’ group but this did not fix the problem.

Initially I changed the application pool account for the web application to a domain account and this fixed the problem, then I changed it back to Network Service and gave that built in account read permission on the registry key –

‘HKEY_LOCAL_MACHINESOFTWAREMICROSOFTOffice Server12.0’

and that also worked! So there are two options in case anyone runs into the same problem.

Hope this helps :-)

One thought on “Opening InfoPath form in SharePoint ‘Requested registry access is not allowed’

  1. Shiva

    This worked for me as well, although it was for a different function. I got the ‘Requested Registry access is not allowed’ error when I tried to run the Sharepoint Configuration Wizard after having installed the WSS 3.0 SP2. Hope this helps others who face this problem. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">