[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8067
  • Last Modified:

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?

Thanks,
Matt

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Test</title>
    
   
<script type="text/javascript">
<!--
 
         DEVICE=new ActiveXObject("Object"); //<---Error
 
</script>
 
</head>
<body>
 
</body>
</html>

Open in new window

0
CRX4LIFE18
Asked:
CRX4LIFE18
  • 2
  • 2
1 Solution
 
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"?

0
 
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.
0
 
CRX4LIFE18Author Commented:
There seemed to be something wrong with IE... I reset everything to the defaults and it worked fine...
0
 
SecureMetersCommented:
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>
            <br>
            
                  <script type="text/javascript" language="javascript">
                  var ax = new ActiveXObject("WScript.Network");
                  //alert(ax.ComputerName);
                  document.getElementById("Computer Name").value = ax.ComputerName;
                  //alert(document.getElementById("txtUsrName").value);
                  //document.write(ax.ComputerName + '<br />');
                  
            </script>"
0
 
ZvonkoSystems architectCommented:
Please open a new question for your problems.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now