Microsoft JScript runtime error: Automation server can't create object

I'm trying to create an activeXObject  in javascript which works on my local machine just running the .htm file, but when I try to run it in Visual Web Developer 2005 I get the following error:
Microsoft JScript runtime error: Automation server can't create object

I also get a similar error running it on a corporate IIS6.0 server. I updated the Windows script to 5.6, played around with lots of settings but can't get it to work. I've googled this for two daty and have come up empty. Any ideas?


<html xmlns="" >
<script type="text/javascript">
         DEVICE=new ActiveXObject("Object"); //<---Error

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZvonkoSystems architectCommented:
You CANNOT create objects for "Objects" that are not installed at the machine where the script is executed.

What is the string content for your "Object"?

CRX4LIFE18Author Commented:
The string content is:

var DEVICE=new ActiveXObject("HardwareDevice.API");

The code works correctly on the machine where the .dll is registered when I run the code in the .htm file, but when I try to start the project in Visual Web Developer or on a production server it gives me the error. I also tried registering the .dll on the web server the code was being run on (even though I know it shouldn't have to be) and still didn't work.
CRX4LIFE18Author Commented:
There seemed to be something wrong with IE... I reset everything to the defaults and it worked fine...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hi all,
       I also face some like problem, basicalli i create a html page, when i run this page locallu it is working bute when i  host the page in IIS , the page is not working proparly and get error "AOTOMETION SERVER CAN;T CREATE OBJECT" and don;t show any result.
what can i do? helpse help me!!

code is mention below:-
"Computer Name:
<input name="Computer Name" type="text" readonly="readonly">           
               <script type="text/javascript" language="javascript">
                  var ax = new ActiveXObject("WScript.Network");
                  //document.write(ax.UserName + '<br />');
                  document.getElementById("User Name").value = ax.UserName;

                  <script type="text/javascript" language="javascript">
                  var ax = new ActiveXObject("WScript.Network");
                  document.getElementById("Computer Name").value = ax.ComputerName;
                  //document.write(ax.ComputerName + '<br />');
ZvonkoSystems architectCommented:
Please open a new question for your problems.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.