• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2130
  • Last Modified:

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

Microsoft JScript runtime error: Automation server can't create objectQuestion:
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 2008 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 IIS6.0 server. I played around with lots of settings but can't get it to work.


<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script language="javascript" type="text/javascript">
        function callFn() {
            var abc = new ActiveXObject("Project1.Class1");
            alert(abc.Age());
        }

    </script>
</head>
<body onload="callFn()">
    <form id="form1" runat="server">
    <div>
    
    </div>
    </form>
</body>
</html>

Open in new window

0
Fi-es
Asked:
Fi-es
1 Solution
 
BardobraveCommented:
Is your ActiveXObject installed in all the environments/machines where you are trying to load it?

Usually "Automation server can't create object" points to two causes:
-Misspell on object names (this probably isn't the problem as you made it work on local environment).
-Absence of object on execution environment.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

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