Link to home
Start Free TrialLog in
Avatar of akorn
akorn

asked on

WSH - New ActiveXObject & Persmission denied

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
akorn
Avatar of CJ_S
CJ_S
Flag of Netherlands image

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...

CJ

Avatar of akorn
akorn

ASKER

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...
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)?

CJ
Avatar of akorn

ASKER

yes i have. both on the remote host and on the local one.
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]")

CJ
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:

quirkyquirky
EliteKiller
liloXwin
 
Thank you,
ComTech
CS Admin @ EE

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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
ASKER CERTIFIED SOLUTION
Avatar of Jgould
Jgould

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial