Give access to a COM component

  • Thread starter Thread starter Oriane
  • Start date Start date
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
 
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.
 
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.
 
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
 
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.
 
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.
 
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)
 
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
 
Back
Top