Access to the registry key is denied (ABCPdf)

早过忘川 提交于 2020-01-22 11:32:05

问题


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


回答1:


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.




回答2:


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.




回答3:


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



回答4:


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"



来源:https://stackoverflow.com/questions/8939234/access-to-the-registry-key-is-denied-abcpdf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!