IE9, Automation server can't create object error while using CertEnroll.dll

Nicholas_Lin picture Nicholas_Lin · Mar 28, 2013 · Viewed 98k times · Source

In my web page, a JS block like this:

var classFactory = new ActiveXObject("X509Enrollment.CX509EnrollmentWebClassFactory");

// Other initialize CertEnroll Objects

It works fine in windows7(32bit or 64bit) with IE8(32bit), as long as I change the IE8 secure setting, enable Initializing and Script ActiveX controls not marked as safe.

But when use IE9(32bit), I try anything I can find on web, it reports error "Automation server can't create object."

I even created a static html file, save it in my hard disk, and then open it with IE9(32bit), it worked fine. Then I put the html file on my web site, visit the html file with url, then it came up with the error message again.

I have worked on this problem for 4 days, any suggestion would be appreciated.

3Q. I hope you can read my words as I'm not an native English speaker.

Answer

Pramod picture Pramod · May 28, 2013

a) Go to Tools-->Internet Options

b) Select security tab

c) Click on Trusted Sites (or Local Intranet depending on whether your site is trusted or not)

d) Click on Custom Level

e) Ensure that "Initialize and script active x controls is not marked safe for scripting" is enabled - this comes under Activex controls and plug-ins section towards 1/4th of the scroll bar.

Click OK, OK.

Once this is completed, clear the browser cookies and cache. Close all your browser sessions. Reopen the IE to launch your site.

Try to disable the setting in step (e) to see if the problem comes back - that should give more insight to the problem.