internet explorer - Import client certificate in IE with javascript -
i trying import/install client certificate ie i'm getting following error in js code.
function importclientcertificate() { try { var objcertenrollclassfactory = document.getelementbyid("objcertenrollclassfactory"); var objenroll = objcertenrollclassfactory.createobject("x509enrollment.cx509enrollment"); var spkcs7 = "-----begin certificate-----" + "miidadccamkccq..." + "-----end certificate-----" objenroll.initialize(1); //->this line causes exception objenroll.installresponse(3, spkcs7, 1, "correctpassword"); } catch (ex) { alert(ex.description); /*exception being thrown: certenroll::cx509enrollment::installresponse: access denied. 0x80070005 (win32: 5 error_access_denied)*/ } }
what reason exception? tried set security level in ie low doesn't helped. manual installation of cert users private cert store works fine.
any highly appreciated.
after 2 days of research on net, find out how script working. solution found ie 11, enable following option in ie settings box.
Comments
Post a Comment