EnjoySharePoint YouTube Channel

JavaScript runtime error: Automation server can’t create object

In this post we will discuss how we can resolve “JavaScript runtime error: Automation server can’t create object” which comes when we try to use ActiveXObject with JavaScript in Asp.Net.

Get Office 365 Enterprise E3 Or Business Premium Subscription & Try out all the features

Also, you can check out some posts on:

– Lock users who provide bad passwords in Asp.Net

– Get stored procedure source text in sql server 2008

– Jagged arrays in C#.Net

Recently I got this error while trying to use ActiveXObject through JavaScript.

I was trying to call like below:

<script type=”text/jscript”>

function GetDongleDetails() {

var x = new ActiveXObject(‘AxControls.HelloWorld’);

var count = x.GetText();



And I was getting the error in the below line:

 var x = new ActiveXObject(‘AxControls.HelloWorld’);

I remembered I have reset my IE setting one day back.


We need to enable some security options in IE settings.

Go to Tools -> Internet Options -> Then select Security tab and then Click on Custom Level button.

Here we need to enable the below options:

– Run ActiveX controls and plug-ins

–  Initialize and script ActiveX controls not marked as safe for scripting.

After this, the error should not come.

Check out Best Alternative to InfoPath -> Try Now
You May Also like the Following SharePoint Tutorials:

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →