Give access to a COM component

O

Oriane

Hi there,

this is certainly not the right NG, anyway... I need to launch a registered
COM component from within an Asp.Net web page, with the worker process. But
this is impossible since the aspnet account isn't authorize for this.
How can I change that ?

Best regards
 
O

Oriane

Hello Mark,
Mark Rae said:
Presumably, you mean that you need to launch the COM component on the
server, not the client browser, otherwise you wouldn't be talking about
the ASPNET account...?
Yes indeed...
Yes. It is already done. However even if I use impersonation, I would like
to know how to control the ACL on a COM component.
Another question: if I use a builin/domain account to impersonate the site,
how van I be sure that it would be authorize to launch the Com component ?

Thanks for your answer.
 
N

Norman Yuan

Yes. It is already done. However even if I use impersonation, I would like
to know how to control the ACL on a COM component.
Another question: if I use a builin/domain account to impersonate the
site, how van I be sure that it would be authorize to launch the Com
component ?

If it is local user account on the server, the local admin would be the one
to set permissions;
if it is domain account, the domain admin is the one to do it.
 
O

Oriane

Hi Norman,
Norman Yuan said:
If it is local user account on the server, the local admin would be the
one to set permissions;
if it is domain account, the domain admin is the one to do it.
Yes for sure but you don't answer my question...

Best regards
 
O

Oriane

Mark Rae said:
Again, I think you've got this backwards. You need to provide whatever
permissions etc are required for the COM component in question...
Yes I want to know how you set the permissions. I know how to set
permissions on files, but not on COM component.
 
A

Anthony Jones

Oriane said:
Yes I want to know how you set the permissions. I know how to set
permissions on files, but not on COM component.

Unless the COM component is actually a DCOM component or is placed in a COM+
application there is no other place to set permissions for access to the
component than on the dll file itself.

However the component may then attempt to access other resources which may
also require permissions.
 
O

Oriane

Hi Anthony,
Anthony Jones said:
Unless the COM component is actually a DCOM component or is placed in a
COM+
application there is no other place to set permissions for access to the
component than on the dll file itself.
It could be the case since setting permissions on the exe (it's not a DLL)
has no effect, and my web service is unable to start it, unless I
impersonate it with a local account. Now that's why I'm a bit "out of topic"
but I don't know a relevant NG.

Here's the error I get (translated from french :-( ):

System.UnauthorizedAccessException: The "providing" of the COM class
factory for the component with CLSID {DFDB36F2-7A63-4112-B9C5-D01155AB7254}
has failed; error: 80070005.
à System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle&
ctor, Boolean& bNeedSecurityCheck)
à System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
fillCache)
à System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean
skipVisibilityChecks, Boolean fillCache)
à System.Activator.CreateInstance(Type type, Boolean nonPublic)
à System.Activator.CreateInstance(Type type)
 
O

Oriane

I have authorize the COM component via the DCOM configuration tool for
Network service, and it seems to work now...

Thanks again for your help and next time, I will try to make myself clear !!

Oriane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top