Access to the registry key is denied (ABCPdf)
Asked Answered
P

4

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

Pucka answered 20/1, 2012 at 9:30 Comment(3)
Have you tried running your program as an Administrator?Savitt
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?Stockade
Btw, I just looked and the key you've posted exists on my machine (Vista x64) - what OS are you running?Stockade
N
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.

Nineteenth answered 6/12, 2012 at 18:8 Comment(1)
Had this error after switching from a server with IE8 to a server with IE11. Very hard to track down!Shewchuk
H
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

Hornstone answered 3/2, 2012 at 3:7 Comment(3)
The look of this UI depends on what version of IIS he is running.Chlorophyll
I'm using ABCpdf and this fixed my problem without having to change the rendering engine. Thanks!Hawsepiece
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.Dispense
N
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.

Nineteenth answered 6/12, 2012 at 18:8 Comment(1)
Had this error after switching from a server with IE8 to a server with IE11. Very hard to track down!Shewchuk
D
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
Diabetes answered 20/3, 2019 at 18:57 Comment(0)
A
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"

Avocet answered 20/1, 2012 at 9:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.