Create COM+ object

P

Pavel Kocar

Hi,

I can't start my service. This service run as user (with user right,
security "run as service"). This service want to create COM + application
run under this same user. If I want to start my service throws next
exception:


Service cannot be started. System.UnauthorizedAccessException: Access is
denied.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType,
Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at
System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Typ
e serverType)
at
System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Typ
e serverType, Object[] props, Boolean bNewObj)
at MobileTouch.CertificateProvider.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object
state)


Can someone help me?

P.K.
 
A

Arild Bakken

Pavel Kocar said:
Hi,

I can't start my service. This service run as user (with user right,
security "run as service"). This service want to create COM + application
run under this same user. If I want to start my service throws next
exception:


Service cannot be started. System.UnauthorizedAccessException: Access is
denied.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType,
Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at
System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Typ
e serverType)
at
System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Typ
e serverType, Object[] props, Boolean bNewObj)
at MobileTouch.CertificateProvider.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object
state)


Can someone help me?

P.K.

By "create COM+ application" I assume you mean "instantiate component hosted
in COM+ application" ?

What OS are you using?
Have you enabled security on the COM+ application?
Does the COM+ app start when you start the service?
Do you get the same error if you start the COM+ app manually before starting
the service?


Arild
 

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