WSH - New ActiveXObject & Persmission denied

Posted on 2002-04-05
Last Modified: 2008-02-01
Im trying to create a COM object using the
myobject = New ActiveXObject([object], [remote host])

this results in a "permission denied" alert.
i get no alerts when i try to create the object locally.

the object is my own and i was wondering if i need to
change some security settings through dcomcnfg?

the code is written using jscript in a .wsf file.

best regards
Question by:akorn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Expert Comment

ID: 6920787
A couple of things to do what you want.

On the remote host the component should have been added to Component Services (win2000 / xp) or MTS (win NT). After that you should also set permission for this object for who may access them and under which user it should be ran. (easily accomplished, check the properties of the component within MTS or Component Services).

Then the next (easy) step is to export the component. This will eventually give you an application which you will need to send to your clients. Run the program from there and the component should be created with the above code (note: only if that user has permission to).

You may need to create a new package (within MTS or Component Services) which suits your needs though...



Author Comment

ID: 6927848
sorry but i think i havent made myself clear.

ive already got the COM Service installed on several machines. and ive also installed the object on the clients. there is no problem running vbs or .wsf files as long as im running them locally ie.:

  Var myobject = New ActiveXObject([Object])

but for some reason the call:

  Var myobject = New ActiveXObject([Object], [Remote Host])

gives a "persmission denied" alert! ive discovered that this alert does not show if the client station is a windows 2000 server, only when im using windows 2000 pro.

also the remote server is NOT on the same domain as the client. when the server is on the same domain as the client theres no problem.

ive tried to change the "Default Authentication Level" in dcomcnfg aswell as added the users in "Default Access Permission" and "Default Launch Permissions". to no avail.

im at loss here...
LVL 22

Expert Comment

ID: 6927892
Have you tried giving Everyone (or at least the IUSR_MACHINENAME and IWAP_MACHINENAME users) launch and access permissions within component services (on the remote host)?

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users


Author Comment

ID: 6927901
yes i have. both on the remote host and on the local one.
LVL 22

Expert Comment

ID: 6927915
Should only be done on the server.

Anyway, another thoguht. You say that when it is within the same domain then everything works correctly. This remoten server is not on the same domain. So, are you accessing it using the http port (80)?

If so you might want to give RDS a try

var mobj = New ActiveXObject("RDS.DataSpace")
var myobject = mobj.CreateObject("[Object]", "[remotehost]")


Expert Comment

ID: 7299413

Expert Comment

ID: 7300661
This person has been suspended for multiple violations of the Member Agreement, and will reject the proposed answer, and return your question to the Active Questions List.  The Moderator Group is deleting all 388 locked questions.

These were posted by three persons:

Thank you,
CS Admin @ EE
LVL 54

Expert Comment

ID: 7508169

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.



Accepted Solution

Jgould earned 0 total points
ID: 7548088
Question has been closed as per recommendation

JGould-EE Moderator

Featured Post

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Simple Linear Regression

695 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