Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 28 Aug 2008 11:16:26 +0200,    group: microsoft.public.dotnet.framework.aspnet        back       


Give access to a COM component   
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
date: Thu, 28 Aug 2008 11:16:26 +0200   author:   Oriane ail

Re: Give access to a COM component   
"Oriane" <oriane@noemail.noemail> wrote in message 
news:OZS1U7OCJHA.524@TK2MSFTNGP06.phx.gbl...

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

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

If so, what you need here is impersonation:
http://www.google.co.uk/search?sourceid=navclient&aq=t&hl=en-GB&ie=UTF-8&rlz=1T4GZEZ_en-GBGB252GB252&q=%22ASP%2eNET%22+impersonation


-- 
Mark Rae
ASP.NET MVP
http://www.markrae.net
date: Thu, 28 Aug 2008 11:02:24 +0100   author:   Mark Rae [MVP]

Re: Give access to a COM component   
Hello Mark,
"Mark Rae [MVP]"  a écrit dans le message de 
news:%23OfjtUPCJHA.1180@TK2MSFTNGP04.phx.gbl...
> "Oriane" <oriane@noemail.noemail> wrote in message 
> news:OZS1U7OCJHA.524@TK2MSFTNGP06.phx.gbl...
>
> 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...

> If so, what you need here is impersonation:
> http://www.google.co.uk/search?sourceid=navclient&aq=t&hl=en-GB&ie=UTF-8&rlz=1T4GZEZ_en-GBGB252GB252&q=%22ASP%2eNET%22+impersonation
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.
date: Thu, 28 Aug 2008 13:18:09 +0200   author:   Oriane ail

Re: Give access to a COM component   
> 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.

>
> Thanks for your answer.
>
date: Thu, 28 Aug 2008 06:52:58 -0700   author:   Norman Yuan

Re: Give access to a COM component   
Hi Norman,
"Norman Yuan"  a écrit dans le message de 
news:%23v30jVRCJHA.3668@TK2MSFTNGP05.phx.gbl...
>
>
>
> 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
date: Thu, 28 Aug 2008 16:16:58 +0200   author:   Oriane ail

Re: Give access to a COM component   
"Oriane" <oriane@noemail.noemail> wrote in message 
news:O6cXV$PCJHA.1180@TK2MSFTNGP04.phx.gbl...

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

I'm not sure I know what you mean... You administer the account which 
ASP.NET impersonates just like you would administer any other account i.e. 
with the MMC snap-in...

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

Again, I think you've got this backwards. You need to provide whatever 
permissions etc are required for the COM component in question...


-- 
Mark Rae
ASP.NET MVP
http://www.markrae.net
date: Thu, 28 Aug 2008 15:25:07 +0100   author:   Mark Rae [MVP]

Re: Give access to a COM component   
"Mark Rae [MVP]"  a écrit dans le message de 
news:ePYBhnRCJHA.2292@TK2MSFTNGP02.phx.gbl...
> 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.
date: Thu, 28 Aug 2008 17:46:10 +0200   author:   Oriane ail

Re: Give access to a COM component   
"Oriane" <oriane@noemail.noemail> wrote in message 
news:eyBjGVSCJHA.5012@TK2MSFTNGP05.phx.gbl...

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

You assign permissions to the account which will be used to call the COM 
component...


-- 
Mark Rae
ASP.NET MVP
http://www.markrae.net
date: Thu, 28 Aug 2008 17:43:52 +0100   author:   Mark Rae [MVP]

Re: Give access to a COM component   
"Oriane" <oriane@noemail.noemail> wrote in message
news:eyBjGVSCJHA.5012@TK2MSFTNGP05.phx.gbl...
>
> "Mark Rae [MVP]"  a écrit dans le message de
> news:ePYBhnRCJHA.2292@TK2MSFTNGP02.phx.gbl...
> > 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.
>

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.

-- 
Anthony Jones - MVP ASP/ASP.NET
date: Thu, 28 Aug 2008 23:01:50 +0100   author:   Anthony Jones

Re: Give access to a COM component   
Hi Anthony,
"Anthony Jones"  a écrit dans le message de 
news:eoX%23tmVCJHA.3496@TK2MSFTNGP03.phx.gbl...
>
>>
>
> 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)
date: Fri, 29 Aug 2008 15:21:33 +0200   author:   Oriane ail

Re: Give access to a COM component   
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
date: Fri, 29 Aug 2008 15:48:33 +0200   author:   Oriane ail

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us