views:

166

answers:

1

I have written an application in C# that writes to an accounting system via a DCOM object (name of the object is Toolkit Object). When this application is hosted as Windows Service in Windows 2003 the service is unable to open the DCOM object although the user identity under which the service is running has all the necessary access rights.

When I host the same application using a console app it works fine.

I have tried tweaking the access rights to the DCOM object through DCOMCNFG but nothing seems to work. Any ideas how to solve this issue?

Thanks

A: 

COM uses Windows Messages to communicate between processes. So the first question is: Does your service have a message pump? If not, that's most likely the problem.

Try creating a hidden window (or a visible window to test the hypothesis).

Andy Jacobs
I tried it and it did not work, I get the same error.
Sabie
Are you able to call other COM objects from your service?
Andy Jacobs
Yes, the one it fails on is accessing resource from the network via a mapped drive.
Sabie