?
Solved

CoCreateInstanceEx returns "Access is Denied"

Posted on 1999-07-21
2
Medium Priority
?
1,617 Views
Last Modified: 2010-09-02
I"ve installed Msdn basic example for DCOM, simple.
and tried to run it.
when the server was on the same machine there was no problem. but when the server was on a different machine i got an error code that meant ( through format message ) "Access is Denied".
this is the calling code
  hr = CoCreateInstanceEx(CLSID_SimpleObject, NULL, CLSCTX_SERVER, pcsi, 1, &mq);
psci contains only the server name and all the other entrances are Null.
i suspect it has to do something with the NT security configuration.
0
Comment
Question by:hed
2 Comments
 

Author Comment

by:hed
ID: 1200691
if i use
CoCreateInstance with CLSCTX_REMOTE_SERVER i get

A Remote Activation was necessary but was not allowed.
0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 1200692
You'll have to run dcomcnfg.exe on the remote server and change the security settings for the DCOM object you're using so that the client maching (and the user you're logged on on the client machine) are allowed to access this particular object on the server. If you're using a domain controller, the DC's user database is queried, if not, make sure that the same account (both user name and password) you're using on the client is also present on the server...
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

589 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