14

I am trying out ABCPdf 8.1 and when using the AddImageUrl(...) method I get the following error:

Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl' is denied.

I have looked in the registry and main\featurecontrol does not exist for CURRENT_USER so I cannot change permissions on it.

Has anyone experienced this before, or know of any solutions I could try?

Thanks in advance

Samuel Slade
  • 8,405
  • 6
  • 33
  • 55
Peuge
  • 1,461
  • 5
  • 20
  • 37
  • Have you tried running your program as an Administrator? – Samuel Slade Jan 20 '12 at 09:44
  • By default, keys and values under HKEY_CURRENT_USER do not require Administrator privileges to modify. I suspect the error is false (or badly reported). Did you try creating the key manually to see if it fixed the issue? – adelphus Jan 20 '12 at 15:07
  • Btw, I just looked and the key you've posted exists on my machine (Vista x64) - what OS are you running? – adelphus Jan 20 '12 at 15:10

4 Answers4

24

Who is the CURRENT_USER? Assuming it's an ASP.NET application identity, have you tried loading its user profile?

Open up IIS Manager and navigate to the application pool for your site. In the Advanced Settings dialog, set Load User Profile to True.

enter image description here

AffineMesh
  • 1,025
  • 8
  • 14
  • The look of this UI depends on what version of IIS he is running. – Andrew Savinykh Feb 03 '12 at 04:05
  • 4
    I'm using ABCpdf and this fixed my problem without having to change the rendering engine. Thanks! – Billy Jan 25 '13 at 02:03
  • On our server the application identity was a special service account. Loading the user profile fixed the issue. FYI, our error logs prior to this error appearing show 'Illegal operation attempted on a registry key that has been marked for deletion'. It would appear somehow this setting was changed on the App Pool identity but not sure how that would have happened. – Alexander Higgins Jan 30 '19 at 20:54
13

Perhaps it's a problem between IE9 and ABCPDF.If this error comes by using AddHtml() or AddImageHtml() , I suggest you to change the Rendering Engine from MSHtml to Gecko.

theDoc.HtmlOptions.Engine = EngineType.Gecko;

http://www.websupergoo.com/support.htm

In my case, this solution solved my error.

matthieuR42
  • 194
  • 1
  • 3
2

If you know the specific key that ABCPDF is trying to add, and you don't want to change the app pool settings, you can set the appropriate key in HKEY_LOCAL_MACHINE. We had exactly that situation and knew that ABCPDF wanted to add the FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI key. So we added the entries below to the registry. Note that the second key is specifically for 32-bit applications running on 64-bit Windows.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI]
"w3wp.exe"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI]
"w3wp.exe"=dword:00000001
JamesQMurphy
  • 4,214
  • 1
  • 36
  • 41
1

I'm not sure if this is the answer but if you are trying to access this programaticaly your executable should run as administrator while accessing it. If you are in debug mode run visual studio as administrator (right click and select "Run as administrator"

Mujtaba Hassan
  • 2,495
  • 2
  • 20
  • 29