Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access to the registry key is denied (ABCPdf)

Tags:

c#

abcpdf

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

like image 424
Peuge Avatar asked Jan 20 '12 09:01

Peuge


3 Answers

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

like image 100
AffineMesh Avatar answered Nov 16 '22 01:11

AffineMesh


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.

like image 13
matthieuR42 Avatar answered Nov 16 '22 01:11

matthieuR42


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
like image 2
JamesQMurphy Avatar answered Nov 16 '22 00:11

JamesQMurphy