Solved

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

Posted on 2010-11-28
1
2,021 Views
Last Modified: 2012-05-10
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
Comment
Question by:Fi-es
1 Comment
 
LVL 19

Accepted Solution

by:
Bardobrave earned 500 total points
ID: 34228459
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now